svn commit: r1799867 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/minilang/tax/ applications/commonext/minilang/setup/ applications/order/minilang/order/ applications/party/minilang/customer/ applications/party/minilang/user/ applications...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1799867 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/minilang/tax/ applications/commonext/minilang/setup/ applications/order/minilang/order/ applications/party/minilang/customer/ applications/party/minilang/user/ applications...

jleroux@apache.org
Author: jleroux
Date: Mon Jun 26 09:55:10 2017
New Revision: 1799867

URL: http://svn.apache.org/viewvc?rev=1799867&view=rev
Log:
No functional change,

While checking there were no other cases like in OFBIZ-9432
(missing path to class), to be consistent I removed the trailing semicolons in
groovy scripts and made few formatting

I did not changes tests code

Modified:
    ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/tax/TaxAuthorityServices.xml
    ofbiz/ofbiz-framework/trunk/applications/commonext/minilang/setup/SetupEvents.xml
    ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml
    ofbiz/ofbiz-framework/trunk/applications/party/minilang/customer/CustomerEvents.xml
    ofbiz/ofbiz-framework/trunk/applications/party/minilang/user/UserEvents.xml
    ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryReserveServices.xml
    ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml
    ofbiz/ofbiz-framework/trunk/framework/common/minilang/CommonServices.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/tax/TaxAuthorityServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/tax/TaxAuthorityServices.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/tax/TaxAuthorityServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/tax/TaxAuthorityServices.xml Mon Jun 26 09:55:10 2017
@@ -92,9 +92,9 @@ under the License.
 
     <simple-method method-name="createCustomerTaxAuthInfo" short-description="Create a Customer PartyTaxAuthInfo">
         <script>groovy:
-            taxAuthPartyGeoIds = parameters.get("taxAuthPartyGeoIds");
-            parameters.put("taxAuthPartyId", taxAuthPartyGeoIds.substring(0, taxAuthPartyGeoIds.indexOf("::")));
-            parameters.put("taxAuthGeoId", taxAuthPartyGeoIds.substring(taxAuthPartyGeoIds.indexOf("::") + 2));
+            taxAuthPartyGeoIds = parameters.get("taxAuthPartyGeoIds")
+            parameters.put("taxAuthPartyId", taxAuthPartyGeoIds.substring(0, taxAuthPartyGeoIds.indexOf("::")))
+            parameters.put("taxAuthGeoId", taxAuthPartyGeoIds.substring(taxAuthPartyGeoIds.indexOf("::") + 2))
         </script>
         <set-service-fields service-name="createPartyTaxAuthInfo" map="parameters" to-map="createPartyTaxAuthInfoMap"/>
         <call-service service-name="createPartyTaxAuthInfo" in-map-name="createPartyTaxAuthInfoMap" include-user-login="true"/>

Modified: ofbiz/ofbiz-framework/trunk/applications/commonext/minilang/setup/SetupEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/commonext/minilang/setup/SetupEvents.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/commonext/minilang/setup/SetupEvents.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/commonext/minilang/setup/SetupEvents.xml Mon Jun 26 09:55:10 2017
@@ -286,11 +286,11 @@
 
         <entity-one entity-name="PartyGroup" value-field="partyGroup"/>
         <script>groovy:
-           groupName = partyGroup.get("groupName");
-           if(groupName != null){
-              parameters.put("invoiceIdPrefix", groupName.toUpperCase().substring(0, 2)+"CI");
-           }else{
-              parameters.put("invoiceIdPrefix", "CI");
+           groupName = partyGroup.get("groupName")
+           if (groupName != null) {
+              parameters.put("invoiceIdPrefix", groupName.toUpperCase().substring(0, 2)+"CI")
+           } else {
+              parameters.put("invoiceIdPrefix", "CI")
            }
         </script>
 

Modified: ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/minilang/order/OrderServices.xml Mon Jun 26 09:55:10 2017
@@ -39,10 +39,10 @@ under the License.
             <now-timestamp field="nowTimestamp"/>
             <!-- TODO: Change this to use the <set-calendar> operation -->
             <script>groovy:
-                calendar = com.ibm.icu.util.Calendar.getInstance();
-                calendar.setTimeInMillis(nowTimestamp.getTime());
-                calendar.add(com.ibm.icu.util.Calendar.MONTH, -monthsToInclude.intValue());
-                parameters.put("fromDate", new Timestamp(calendar.getTimeInMillis()));
+                calendar = com.ibm.icu.util.Calendar.getInstance()
+                calendar.setTimeInMillis(nowTimestamp.getTime())
+                calendar.add(com.ibm.icu.util.Calendar.MONTH, -monthsToInclude.intValue())
+                parameters.put("fromDate", new Timestamp(calendar.getTimeInMillis()))
             </script>
             <set from-field="nowTimestamp" field="parameters.thruDate"/>
         </if-not-empty>
@@ -729,12 +729,12 @@ under the License.
              into "shipmentMethodTypeId", "carrierPartyId" and "carrierRoleTypeId".
         -->
         <script>groovy:
-            shipmentMethod = parameters.get("shipmentMethod");
-            if(shipmentMethod != null){
-               arr = shipmentMethod.split( "@" );
-               parameters.put("shipmentMethodTypeId", arr[0]);
-               parameters.put("carrierPartyId", arr[1]);
-               parameters.put("carrierRoleTypeId", arr[2]);
+            shipmentMethod = parameters.get("shipmentMethod")
+            if (shipmentMethod != null) {
+               arr = shipmentMethod.split( "@" )
+               parameters.put("shipmentMethodTypeId", arr[0])
+               parameters.put("carrierPartyId", arr[1])
+               parameters.put("carrierRoleTypeId", arr[2])
             }
         </script>
         <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
@@ -1275,11 +1275,11 @@ under the License.
         -->
 
         <script>groovy:
-            shipmentMethodAndAmount = parameters.get("shipmentMethodAndAmount");
+            shipmentMethodAndAmount = parameters.get("shipmentMethodAndAmount")
             if (shipmentMethodAndAmount != null) {
-               parameters.put("shipmentMethod", shipmentMethodAndAmount.substring(0, shipmentMethodAndAmount.indexOf("*")));
-               parameters.put("amount", shipmentMethodAndAmount.substring(shipmentMethodAndAmount.indexOf("*")+1));
-               parameters.put("shipmentMethodTypeId", shipmentMethodAndAmount.substring(0, shipmentMethodAndAmount.indexOf("@")));
+               parameters.put("shipmentMethod", shipmentMethodAndAmount.substring(0, shipmentMethodAndAmount.indexOf("*")))
+               parameters.put("amount", shipmentMethodAndAmount.substring(shipmentMethodAndAmount.indexOf("*")+1))
+               parameters.put("shipmentMethodTypeId", shipmentMethodAndAmount.substring(0, shipmentMethodAndAmount.indexOf("@")))
             }
         </script>
         <set field="newAmount" from-field="parameters.amount" type="BigDecimal"/>

Modified: ofbiz/ofbiz-framework/trunk/applications/party/minilang/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/minilang/customer/CustomerEvents.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/party/minilang/customer/CustomerEvents.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/party/minilang/customer/CustomerEvents.xml Mon Jun 26 09:55:10 2017
@@ -77,10 +77,10 @@ under the License.
 
         <!-- Check the password, etc for validity -->
         <script>groovy:
-            String password = (String) userLoginContext.get("currentPassword");
-            String confirmPassword = (String) userLoginContext.get("currentPasswordVerify");
-            String passwordHint = (String) userLoginContext.get("passwordHint");
-            org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale);
+            String password = (String) userLoginContext.get("currentPassword")
+            String confirmPassword = (String) userLoginContext.get("currentPasswordVerify")
+            String passwordHint = (String) userLoginContext.get("passwordHint")
+            org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale)
         </script>
 
         <!-- Create the Person -->

Modified: ofbiz/ofbiz-framework/trunk/applications/party/minilang/user/UserEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/minilang/user/UserEvents.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/party/minilang/user/UserEvents.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/party/minilang/user/UserEvents.xml Mon Jun 26 09:55:10 2017
@@ -108,10 +108,10 @@ under the License.
 
             <!-- Check the password, etc for validity -->
             <script>groovy:
-                String password = (String) userLoginContext.get("currentPassword");
-                String confirmPassword = (String) userLoginContext.get("currentPasswordVerify");
-                String passwordHint = (String) userLoginContext.get("passwordHint");
-                org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale);
+                String password = (String) userLoginContext.get("currentPassword")
+                String confirmPassword = (String) userLoginContext.get("currentPasswordVerify")
+                String passwordHint = (String) userLoginContext.get("passwordHint")
+                org.apache.ofbiz.common.login.LoginServices.checkNewPassword(newUserLogin, null, password, confirmPassword, passwordHint, error_list, true, locale)
             </script>
         <else>
             <if-compare field="require_login" operator="equals" value="true">
@@ -314,8 +314,8 @@ under the License.
             <!-- If password encryption is enabled, encrpyt it now -->
             <set field="delegator" from-field="parameters.delegator" type="Object"/>
             <script>groovy:
-                boolean useEncryption = "true".equals(org.apache.ofbiz.entity.util.EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
-                if (useEncryption) { newUserLogin.set("currentPassword", org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))); }
+                boolean useEncryption = "true".equals(org.apache.ofbiz.entity.util.EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator))
+                if (useEncryption) { newUserLogin.set("currentPassword", org.apache.ofbiz.base.crypto.HashCrypt.getDigestHash((String) newUserLogin.get("currentPassword"))) }
             </script>
 
             <!-- create the UserLogin manually to get around ordering and security constraints in the service -->

Modified: ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryReserveServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryReserveServices.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryReserveServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/minilang/product/inventory/InventoryReserveServices.xml Mon Jun 26 09:55:10 2017
@@ -195,11 +195,11 @@ under the License.
                             </if-empty>
                             <!-- TODO: Convert this to a <set-calendar> operation -->
                             <script>groovy:
-                            java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate");
-                            com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance();
-                            cal.setTimeInMillis(orderDate.getTime());
-                            cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue());
-                            return org.apache.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis()));
+                            java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate")
+                            com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance()
+                            cal.setTimeInMillis(orderDate.getTime())
+                            cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue())
+                            return org.apache.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis()))
                             </script>
 
                             <!-- create or update OrderItemShipGrpInvRes record -->
@@ -263,11 +263,11 @@ under the License.
                             </if-empty>
                             <!-- TODO: Convert this to a <set-calendar> operation -->
                             <script>groovy:
-                            java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate");
-                            com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance();
-                            cal.setTimeInMillis(orderDate.getTime());
-                            cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue());
-                            return org.apache.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis()));
+                            java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate")
+                            com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance()
+                            cal.setTimeInMillis(orderDate.getTime())
+                            cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue())
+                            return org.apache.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis()))
                             </script>
 
                             <!-- create OrderItemShipGrpInvRes record -->
@@ -505,11 +505,11 @@ under the License.
         </if-empty>
         <!-- TODO: Convert this to a <set-calendar> operation -->
         <script>groovy:
-        java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate");
-        com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance();
-        cal.setTimeInMillis(orderDate.getTime());
-        cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue());
-        return org.apache.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis()));
+        java.sql.Timestamp orderDate = orderHeader.getTimestamp("orderDate")
+        com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance()
+        cal.setTimeInMillis(orderDate.getTime())
+        cal.add(com.ibm.icu.util.Calendar.DAY_OF_YEAR, daysToShip.intValue())
+        return org.apache.ofbiz.base.util.UtilMisc.toMap("promisedDatetime", new java.sql.Timestamp(cal.getTimeInMillis()))
         </script>
     </simple-method>
 

Modified: ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml Mon Jun 26 09:55:10 2017
@@ -622,19 +622,19 @@ under the License.
 
         <if-empty field="shipment.estimatedShipCost">
             <script>groovy:
-                    import java.math.BigDecimal;
-                    import org.apache.ofbiz.order.order.OrderReadHelper;
+                    import java.math.BigDecimal
+                    import org.apache.ofbiz.order.order.OrderReadHelper
 
-                    orderReadHelper = new OrderReadHelper(orderHeader);
-                    orderItems = orderReadHelper.getValidOrderItems();
-                    orderAdjustments = orderReadHelper.getAdjustments();
-                    orderHeaderAdjustments = orderReadHelper.getOrderHeaderAdjustments();
-                    orderSubTotal = orderReadHelper.getOrderItemsSubTotal();
-
-                    shippingAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true);
-                    shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true));
-                    //org.apache.ofbiz.base.util.Debug.log("shippingAmmount=" + shippingAmount);
-                    shipment.put("estimatedShipCost", shippingAmount);
+                    orderReadHelper = new OrderReadHelper(orderHeader)
+                    orderItems = orderReadHelper.getValidOrderItems()
+                    orderAdjustments = orderReadHelper.getAdjustments()
+                    orderHeaderAdjustments = orderReadHelper.getOrderHeaderAdjustments()
+                    orderSubTotal = orderReadHelper.getOrderItemsSubTotal()
+
+                    shippingAmount = OrderReadHelper.getAllOrderItemsAdjustmentsTotal(orderItems, orderAdjustments, false, false, true)
+                    shippingAmount = shippingAmount.add(OrderReadHelper.calcOrderAdjustments(orderHeaderAdjustments, orderSubTotal, false, false, true))
+                    //org.apache.ofbiz.base.util.Debug.log("shippingAmmount=" + shippingAmount)
+                    shipment.put("estimatedShipCost", shippingAmount)
             </script>
         </if-empty>
 
@@ -683,8 +683,8 @@ under the License.
             <if-empty field="shipment.originContactMechId">
                 <script>groovy:
                     facilityContactMech = org.apache.ofbiz.party.contact.ContactMechWorker.getFacilityContactMechByPurpose(
-                                delegator, shipment.get("originFacilityId"), org.apache.ofbiz.base.util.UtilMisc.toList("SHIP_ORIG_LOCATION", "PRIMARY_LOCATION")
-                            );
+                                delegator, shipment.get("originFacilityId"),
+                                org.apache.ofbiz.base.util.UtilMisc.toList("SHIP_ORIG_LOCATION", "PRIMARY_LOCATION"))
                     if (facilityContactMech != null) {
                         shipment.put("originContactMechId", facilityContactMech.get("contactMechId"));
                     }
@@ -693,10 +693,10 @@ under the License.
             <if-empty field="shipment.originTelecomNumberId">
                 <script>groovy:
                     facilityContactMech = org.apache.ofbiz.party.contact.ContactMechWorker.getFacilityContactMechByPurpose(
-                                delegator, shipment.get("originFacilityId"), org.apache.ofbiz.base.util.UtilMisc.toList("PHONE_SHIP_ORIG", "PRIMARY_PHONE")
-                            );
+                                delegator, shipment.get("originFacilityId"),
+                                org.apache.ofbiz.base.util.UtilMisc.toList("PHONE_SHIP_ORIG", "PRIMARY_PHONE"))
                     if (facilityContactMech != null) {
-                        shipment.put("originTelecomNumberId", facilityContactMech.get("contactMechId"));
+                        shipment.put("originTelecomNumberId", facilityContactMech.get("contactMechId"))
                     }
                 </script>
             </if-empty>
@@ -705,20 +705,20 @@ under the License.
             <if-empty field="shipment.destinationContactMechId">
                 <script>groovy:
                     facilityContactMech = org.apache.ofbiz.party.contact.ContactMechWorker.getFacilityContactMechByPurpose(
-                                delegator, shipment.get("destinationFacilityId"), org.apache.ofbiz.base.util.UtilMisc.toList("SHIPPING_LOCATION", "PRIMARY_LOCATION")
-                            );
+                                delegator, shipment.get("destinationFacilityId"),
+                                org.apache.ofbiz.base.util.UtilMisc.toList("SHIPPING_LOCATION", "PRIMARY_LOCATION"))
                     if (facilityContactMech != null) {
-                        shipment.put("destinationContactMechId", facilityContactMech.get("contactMechId"));
+                        shipment.put("destinationContactMechId", facilityContactMech.get("contactMechId"))
                     }
                 </script>
             </if-empty>
             <if-empty field="shipment.destinationTelecomNumberId">
                 <script>groovy:
                     facilityContactMech = org.apache.ofbiz.party.contact.ContactMechWorker.getFacilityContactMechByPurpose(
-                                delegator, shipment.get("destinationFacilityId"), org.apache.ofbiz.base.util.UtilMisc.toList("PHONE_SHIPPING", "PRIMARY_PHONE")
-                            );
+                                delegator, shipment.get("destinationFacilityId"),
+                                org.apache.ofbiz.base.util.UtilMisc.toList("PHONE_SHIPPING", "PRIMARY_PHONE"))
                     if (facilityContactMech != null) {
-                        shipment.put("destinationTelecomNumberId", facilityContactMech.get("contactMechId"));
+                        shipment.put("destinationTelecomNumberId", facilityContactMech.get("contactMechId"))
                     }
                 </script>
             </if-empty>

Modified: ofbiz/ofbiz-framework/trunk/framework/common/minilang/CommonServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/minilang/CommonServices.xml?rev=1799867&r1=1799866&r2=1799867&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/minilang/CommonServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/minilang/CommonServices.xml Mon Jun 26 09:55:10 2017
@@ -193,10 +193,10 @@ under the License.
             <call-object-method obj-field="uploadProgressListener" method-name="hasStarted" ret-field="parameters.hasStarted"/>
             <field-to-result field="parameters.hasStarted" result-name="hasStarted"/>
             <script>groovy:
-                contentLength = parameters.get("contentLength");
-                bytesRead = parameters.get("bytesRead");
-                int readPercent = (bytesRead* 100)/contentLength;
-                parameters.put("readPercent", readPercent);
+                contentLength = parameters.get("contentLength")
+                bytesRead = parameters.get("bytesRead")
+                int readPercent = (bytesRead* 100)/contentLength
+                parameters.put("readPercent", readPercent)
             </script>
             <field-to-result field="parameters.readPercent" result-name="readPercent"/>
             <field-to-result field="parameters.hasStarted" result-name="hasStarted"/>