svn commit: r1680274 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy

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

svn commit: r1680274 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy

Deepak Dixit-5
Author: deepak
Date: Tue May 19 12:43:54 2015
New Revision: 1680274

URL: http://svn.apache.org/r1680274
Log:
Added locale and timeZone as a service in parameter for groovy dsl. Now locale and timeZone not passed as service in parameter then groovy dsl will get it from context and passed as service in parameter.

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy?rev=1680274&r1=1680273&r2=1680274&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyBaseScript.groovy Tue May 19 12:43:54 2015
@@ -30,6 +30,12 @@ abstract class GroovyBaseScript extends
         if (!inputMap.userLogin) {
             inputMap.userLogin = this.binding.getVariable('parameters').userLogin;
         }
+        if (!inputMap.timeZone) {
+            inputMap.timeZone = this.binding.getVariable('parameters').timeZone;
+        }
+        if (!inputMap.locale) {
+            inputMap.locale = this.binding.getVariable('parameters').locale;
+        }
         Map result = binding.getVariable('dispatcher').runSync(serviceName, inputMap);
         if (ServiceUtil.isError(result)) {
             throw new ExecutionServiceException(ServiceUtil.getErrorMessage(result))