svn commit: r755696 - in /ofbiz/trunk: applications/content/src/org/ofbiz/content/data/ applications/order/src/org/ofbiz/order/shoppingcart/ applications/party/webapp/partymgr/WEB-INF/actions/party/ framework/common/src/org/ofbiz/common/ framework/comm...

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

svn commit: r755696 - in /ofbiz/trunk: applications/content/src/org/ofbiz/content/data/ applications/order/src/org/ofbiz/order/shoppingcart/ applications/party/webapp/partymgr/WEB-INF/actions/party/ framework/common/src/org/ofbiz/common/ framework/comm...

jleroux@apache.org
Author: jleroux
Date: Wed Mar 18 18:43:49 2009
New Revision: 755696

URL: http://svn.apache.org/viewvc?rev=755696&view=rev
Log:
All tabs to 4 spaces in *.groovy, *.java, *.xml
Done with Eclipse S/R "\t"

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
    ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java
    ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
    ofbiz/trunk/framework/webslinger/build.xml
    ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
    ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Wed Mar 18 18:43:49 2009
@@ -685,20 +685,20 @@
                     }
                     // render the screen
                     ModelScreen modelScreen = null;
-                 ScreenStringRenderer renderer = screens.getScreenStringRenderer();
-                 String combinedName = dataResource.getString("objectInfo");
+                    ScreenStringRenderer renderer = screens.getScreenStringRenderer();
+                    String combinedName = dataResource.getString("objectInfo");
                     if ("URL_RESOURCE".equals(dataResource.getString("dataResourceTypeId")) && UtilValidate.isNotEmpty(combinedName) && combinedName.startsWith("component://")) {
-                     modelScreen = ScreenFactory.getScreenFromLocation(combinedName);
+                        modelScreen = ScreenFactory.getScreenFromLocation(combinedName);
                     } else { // stored in  a single file, long or short text
-                     Document screenXml = UtilXml.readXmlDocument(getDataResourceText(dataResource, targetMimeTypeId, locale, templateContext, delegator, cache), true);
-                     Map modelScreenMap = ScreenFactory.readScreenDocument(screenXml, "DataResourceId: " + dataResource.getString("dataResourceId"));
-                     if (UtilValidate.isNotEmpty(modelScreenMap)) {
-                     Map.Entry entry = (Map.Entry) (modelScreenMap.entrySet().iterator().next()); // get first entry, only one screen allowed per file
-                     modelScreen = (ModelScreen) entry.getValue();
-                     }
+                        Document screenXml = UtilXml.readXmlDocument(getDataResourceText(dataResource, targetMimeTypeId, locale, templateContext, delegator, cache), true);
+                        Map modelScreenMap = ScreenFactory.readScreenDocument(screenXml, "DataResourceId: " + dataResource.getString("dataResourceId"));
+                        if (UtilValidate.isNotEmpty(modelScreenMap)) {
+                            Map.Entry entry = (Map.Entry) (modelScreenMap.entrySet().iterator().next()); // get first entry, only one screen allowed per file
+                            modelScreen = (ModelScreen) entry.getValue();
+                        }
                     }
                     if (UtilValidate.isNotEmpty(modelScreen)) {
-                     modelScreen.renderScreenString(out, context, renderer);
+                        modelScreen.renderScreenString(out, context, renderer);
                     } else {
                         throw new GeneralException("The dataResource file [" + dataResourceId + "] could not be found");
                     }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Wed Mar 18 18:43:49 2009
@@ -1690,7 +1690,7 @@
             try {
                 thisOrder = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false);
             } catch (GenericEntityException e) {
-             Debug.logError(e.getMessage(), module);
+                Debug.logError(e.getMessage(), module);
             }
             if (thisOrder == null) {
                 cart.setOrderId(orderId);

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy Wed Mar 18 18:43:49 2009
@@ -22,9 +22,9 @@
 if (userLogin) {
     userLoginParty = userLogin.getRelatedOneCache("Party");
     if (userLoginParty) {
-     userLoginPartyPrimaryEmails = userLoginParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "PRIMARY_EMAIL"]);
-     if (userLoginPartyPrimaryEmails) {
-     context.thisUserPrimaryEmail = userLoginPartyPrimaryEmails.get(0);
-     }
+        userLoginPartyPrimaryEmails = userLoginParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "PRIMARY_EMAIL"]);
+        if (userLoginPartyPrimaryEmails) {
+            context.thisUserPrimaryEmail = userLoginPartyPrimaryEmails.get(0);
+        }
     }
 }

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java Wed Mar 18 18:43:49 2009
@@ -154,7 +154,7 @@
             if (!test.exists()) {
                 test.mkdir();
             }
-         CAPTCHA_FILE_NAME = UtilDateTime.nowAsString().concat(".jpg");
+            CAPTCHA_FILE_NAME = UtilDateTime.nowAsString().concat(".jpg");
             request.setAttribute("captchaFileName", URL_FILE_PATH + CAPTCHA_FILE_NAME);
             request.setAttribute("ID_KEY", ID_KEY);
             ImageIO.write(image, "jpg", new File( CAPTCHA_FILE_PATH + CAPTCHA_FILE_NAME));

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Wed Mar 18 18:43:49 2009
@@ -546,7 +546,7 @@
         List fieldList =  (List) context.get("fieldList");
         Set fieldSet = null;        
         if (fieldList != null) {
-         fieldSet = new HashSet(fieldList);
+            fieldSet = new HashSet(fieldList);
         }
         GenericDelegator delegator = dctx.getDelegator();
         // Retrieve entities  - an iterator over all the values

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy Wed Mar 18 18:43:49 2009
@@ -23,35 +23,35 @@
 
 // executes only on startup when no parameters.portalPageId is available
 if (userLogin && parameters.parentPortalPageId && !parameters.portalPageId) {
- // look for system page according the current securitygroup
- //get the security group
- userLoginSecurityGroupId = null;
- condSec = EntityCondition.makeCondition([
- EntityCondition.makeCondition("groupId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
- EntityCondition.makeCondition("userLoginId", EntityOperator.EQUALS, userLogin.userLoginId)
- ],EntityOperator.AND);
- userLoginSecurityGroups = delegator.findList("UserLoginSecurityGroup", condSec, null, null, null, false);
- if (UtilValidate.isNotEmpty(userLoginSecurityGroups)) {
- userLoginSecurityGroupId = userLoginSecurityGroups.get(0).get("groupId");
- }
- //get the portal page
- cond1 = EntityCondition.makeCondition([
- EntityCondition.makeCondition("portalPageId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
- EntityCondition.makeCondition("securityGroupId", EntityOperator.EQUALS, userLoginSecurityGroupId),
- EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, "_NA_"),
- EntityCondition.makeCondition("parentPortalPageId", EntityOperator.EQUALS, null)
- ],EntityOperator.AND);
- portalMainPages = delegator.findList("PortalPage", cond1, null, null, null, false);
- if (portalMainPages) {
- portalPage = portalMainPages.get(0);
- if ("_NA_".equals(portalPage.ownerUserLoginId)) {
- context.parameters.parentPortalPageId = portalPage.portalPageId;
- } else {
- context.parameters.parentPortalPageId = portalPage.orginalPortalPageId;
- }
- context.parameters.portalPageId = portalPage.portalPageId; //make sure we have a starting portalPageId
- if (!context.headerItem) {
- context.headerItem = portalPage.portalPageId; // and the menu item is highlighted
- }
- }
+    // look for system page according the current securitygroup
+    //get the security group
+    userLoginSecurityGroupId = null;
+    condSec = EntityCondition.makeCondition([
+            EntityCondition.makeCondition("groupId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
+            EntityCondition.makeCondition("userLoginId", EntityOperator.EQUALS, userLogin.userLoginId)
+            ],EntityOperator.AND);
+    userLoginSecurityGroups = delegator.findList("UserLoginSecurityGroup", condSec, null, null, null, false);
+    if (UtilValidate.isNotEmpty(userLoginSecurityGroups)) {
+        userLoginSecurityGroupId = userLoginSecurityGroups.get(0).get("groupId");
+    }
+    //get the portal page
+    cond1 = EntityCondition.makeCondition([
+            EntityCondition.makeCondition("portalPageId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
+            EntityCondition.makeCondition("securityGroupId", EntityOperator.EQUALS, userLoginSecurityGroupId),
+            EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, "_NA_"),
+            EntityCondition.makeCondition("parentPortalPageId", EntityOperator.EQUALS, null)
+            ],EntityOperator.AND);
+    portalMainPages = delegator.findList("PortalPage", cond1, null, null, null, false);
+    if (portalMainPages) {
+        portalPage = portalMainPages.get(0);
+        if ("_NA_".equals(portalPage.ownerUserLoginId)) {
+            context.parameters.parentPortalPageId = portalPage.portalPageId;
+        } else {
+            context.parameters.parentPortalPageId = portalPage.orginalPortalPageId;
+        }
+        context.parameters.portalPageId = portalPage.portalPageId; //make sure we have a starting portalPageId
+        if (!context.headerItem) {
+            context.headerItem = portalPage.portalPageId; // and the menu item is highlighted
+        }
+    }
 }

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy Wed Mar 18 18:43:49 2009
@@ -22,19 +22,19 @@
 import org.ofbiz.entity.condition.*;
 // only execute when a user is logged in
 if (parameters.userLogin) {
- if (!parameters.parentPortalPageId) {
- portalPage = delegator.findByPrimaryKey("PortalPage", [portalPageId : parameters.portalPageId]);
- if (portalPage) {
-        parameters.parentPortalPageId = portalPage.parentPortalPageId;
-        if (!parameters.parentPortalPageId) {
-         if(portalPage.originalPortalPageId) {
-         parameters.parentPortalPageId = portalPage.originalPortalPageId;
-         } else {
+    if (!parameters.parentPortalPageId) {
+        portalPage = delegator.findByPrimaryKey("PortalPage", [portalPageId : parameters.portalPageId]);
+        if (portalPage) {
+            parameters.parentPortalPageId = portalPage.parentPortalPageId;
+            if (!parameters.parentPortalPageId) {
+                if(portalPage.originalPortalPageId) {
+                    parameters.parentPortalPageId = portalPage.originalPortalPageId;
+                } else {
                     parameters.parentPortalPageId = portalPage.portalPageId;
-         }
-        }
- }
- }
+                }
+            }
+        }
+    }
     userLoginSecurityGroupId = null;
     condSec = EntityCondition.makeCondition([
                   EntityCondition.makeCondition("groupId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
@@ -58,7 +58,7 @@
     if (portalMainPages) {
         parentPortalPageId = portalMainPages.get(0).portalPageId;
     } else {
-     parentPortalPageId = parameters.parentPortalPageId
+        parentPortalPageId = parameters.parentPortalPageId
     }
     // get user and system pages
     ppCond =

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy Wed Mar 18 18:43:49 2009
@@ -24,25 +24,25 @@
 categories = delegator.findList("PortletPortletCategory", ppCond, null, null, null, false);
 
 portalPortlets = [];
- categories.each { category ->
- pCond = EntityCondition.makeCondition("portalPortletId", EntityOperator.EQUALS, category.get("portalPortletId"));
- listPortalPortlets = delegator.findList("PortalPortlet", pCond, null, null, null, false);
+    categories.each { category ->
+    pCond = EntityCondition.makeCondition("portalPortletId", EntityOperator.EQUALS, category.get("portalPortletId"));
+    listPortalPortlets = delegator.findList("PortalPortlet", pCond, null, null, null, false);
 
- inMap = [:];
+    inMap = [:];
     listPortalPortlets.each { listPortalPortlet ->
- if (listPortalPortlet.securityServiceName && listPortalPortlet.securityMainAction) {
- inMap.mainAction = listPortalPortlet.securityMainAction;
- inMap.userLogin = context.userLogin;
- result = dispatcher.runSync(listPortalPortlet.securityServiceName, inMap)
- hasPermission = result.hasPermission;
- } else {
- hasPermission = true;
- }
+        if (listPortalPortlet.securityServiceName && listPortalPortlet.securityMainAction) {
+            inMap.mainAction = listPortalPortlet.securityMainAction;
+            inMap.userLogin = context.userLogin;
+            result = dispatcher.runSync(listPortalPortlet.securityServiceName, inMap)
+            hasPermission = result.hasPermission;
+        } else {
+            hasPermission = true;
+        }
     
- if (hasPermission) {
- portalPortlets.add(listPortalPortlet);
- }
- }
+        if (hasPermission) {
+            portalPortlets.add(listPortalPortlet);
+        }
+    }
 }
 
 context.portletCat = delegator.findAll("PortletCategory");

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Wed Mar 18 18:43:49 2009
@@ -111,7 +111,7 @@
         // get the controllerConfig once for this method so we don't have to get it over and over inside the method
         ConfigXMLReader.ControllerConfig controllerConfig = this.getControllerConfig();
 
-        // workaraound if we are in the root webapp
+        // workaround if we are in the root webapp
         String cname = UtilHttp.getApplicationName(request);
 
         // Grab data from request object to process
@@ -127,13 +127,13 @@
         String overrideViewUri = RequestHandler.getOverrideViewUri(request.getPathInfo());
         
         String requestMissingErrorMessage = "Unknown request [" + defaultRequestUri + "]; this request does not exist or cannot be called directly.";
- ConfigXMLReader.RequestMap requestMap = null;
- if (defaultRequestUri != null) {
- requestMap = controllerConfig.requestMapMap.get(defaultRequestUri);
- }
+        ConfigXMLReader.RequestMap requestMap = null;
+        if (defaultRequestUri != null) {
+            requestMap = controllerConfig.requestMapMap.get(defaultRequestUri);
+        }
         // check for default request
         if (requestMap == null) {
-         requestMap = controllerConfig.requestMapMap.get(controllerConfig.defaultRequest);
+            requestMap = controllerConfig.requestMapMap.get(controllerConfig.defaultRequest);
         }
         // still not found so stop
         if (requestMap == null) {
@@ -786,11 +786,11 @@
      * @return
      */
     public String makeQueryString(HttpServletRequest request, ConfigXMLReader.RequestResponse requestResponse) {
-     if (requestResponse == null || requestResponse.redirectParameterMap.size() == 0) {
+        if (requestResponse == null || requestResponse.redirectParameterMap.size() == 0) {
             Map<String, Object> urlParams = UtilHttp.getUrlOnlyParameterMap(request);
             String queryString = UtilHttp.urlEncodeArgs(urlParams, false);
             return "?" + queryString;
-     } else {
+        } else {
             StringBuilder queryString = new StringBuilder();
             queryString.append("?");
             for (Map.Entry<String, String> entry: requestResponse.redirectParameterMap.entrySet()) {
@@ -812,7 +812,7 @@
                 }
             }
             return queryString.toString();
-     }
+        }
     }
 
     public String makeLinkWithQueryString(HttpServletRequest request, HttpServletResponse response, String url, ConfigXMLReader.RequestResponse requestResponse) {

Modified: ofbiz/trunk/framework/webslinger/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/build.xml?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/webslinger/build.xml (original)
+++ ofbiz/trunk/framework/webslinger/build.xml Wed Mar 18 18:43:49 2009
@@ -50,7 +50,7 @@
     <!-- ================================================================== -->
 
     <target name="classes" depends="prepare">
-     <javac15/>
+        <javac15/>
     </target>
 
     <!-- ================================================================== -->

Modified: ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy (original)
+++ ofbiz/trunk/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy Wed Mar 18 18:43:49 2009
@@ -23,24 +23,24 @@
 
 def buildCondition
 def getValue = { item ->
- if (item instanceof Map) return buildCondition(item)
- return item
+    if (item instanceof Map) return buildCondition(item)
+    return item
 }
 buildCondition = { item ->
- switch (item.name) {
- case "EntityConditionList":
- def conditions = []
- for (conditionDef in item.list) {
- conditions.add(buildCondition(conditionDef))
- }
- return new EntityConditionList(conditions, EntityOperator.lookup(item.operator))
- case "EntityExpr":
- return new EntityExpr(getValue(item.left), EntityOperator.lookup(item.operator), getValue(item.right))
- case "Include":
- return webslinger.event(item.path)
- default:
- throw new InternalError(item.toString())
- }
+    switch (item.name) {
+        case "EntityConditionList":
+            def conditions = []
+            for (conditionDef in item.list) {
+                conditions.add(buildCondition(conditionDef))
+            }
+            return new EntityConditionList(conditions, EntityOperator.lookup(item.operator))
+        case "EntityExpr":
+            return new EntityExpr(getValue(item.left), EntityOperator.lookup(item.operator), getValue(item.right))
+        case "Include":
+            return webslinger.event(item.path)
+        default:
+            throw new InternalError(item.toString())
+    }
 }
 
 return buildCondition(webslinger.payload)

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Wed Mar 18 18:43:49 2009
@@ -181,9 +181,9 @@
             writer.append('>');
             
             if (UtilValidate.isNotEmpty(request.getAttribute("image"))){
-             writer.append("<img src=\"");
-             writer.append(request.getAttribute("image").toString());
-             writer.append("\"/>");
+                writer.append("<img src=\"");
+                writer.append(request.getAttribute("image").toString());
+                writer.append("\"/>");
             }
 
             writer.append(description);

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Wed Mar 18 18:43:49 2009
@@ -833,11 +833,11 @@
         } else if ("upload".equals(this.type)) {
             this.renderSingleFormString(writer, context, formStringRenderer, positions);
         } else {
-         if (UtilValidate.isEmpty(this.getType())) {
+            if (UtilValidate.isEmpty(this.getType())) {
                 throw new IllegalArgumentException("The form 'type' tag is missing or empty on the form with the name " + this.getName());
-         } else {
-         throw new IllegalArgumentException("The form type " + this.getType() + " is not supported for form with name " + this.getName());
-         }
+            } else {
+                throw new IllegalArgumentException("The form type " + this.getType() + " is not supported for form with name " + this.getName());
+            }
         }
     }
 

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Wed Mar 18 18:43:49 2009
@@ -2280,7 +2280,7 @@
         }
         
         public String getImage() {
-         return this.image;
+            return this.image;
         }
 
         /**

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Wed Mar 18 18:43:49 2009
@@ -334,7 +334,7 @@
      * @see org.ofbiz.widget.form.FormStringRenderer#renderHyperlinkField(java.io.Writer, java.util.Map, org.ofbiz.widget.form.ModelFormField.HyperlinkField)
      */
     public void renderHyperlinkField(Appendable writer, Map<String, Object> context, HyperlinkField hyperlinkField) throws IOException {
-     this.request.setAttribute("image", hyperlinkField.getImage());
+        this.request.setAttribute("image", hyperlinkField.getImage());
         ModelFormField modelFormField = hyperlinkField.getModelFormField();
         
         WidgetWorker.makeHyperlinkByType(writer, hyperlinkField.getLinkType(), modelFormField.getWidgetStyle(), hyperlinkField.getTargetType(), hyperlinkField.getTarget(context),

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java Wed Mar 18 18:43:49 2009
@@ -351,7 +351,7 @@
     }
 
     public String getParentPortalPageId(Map<String, Object> context) {
-     return this.parentPortalPageId.expandString(context);
+        return this.parentPortalPageId.expandString(context);
     }
 
     public String getWidgetStyle() {

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/CommonScreens.xml Wed Mar 18 18:43:49 2009
@@ -57,7 +57,7 @@
                 </service>
                 <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
                 <set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/header.ftl"/>
-                <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/>
+                <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/>            
             </actions>
             <widgets>
                 <!-- render header -->

Modified: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java?rev=755696&r1=755695&r2=755696&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java (original)
+++ ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/ProductsExportToGoogle.java Wed Mar 18 18:43:49 2009
@@ -307,190 +307,190 @@
     }
     
     private static Map buildDataItemsXml(DispatchContext dctx, Map context, StringBuffer dataItemsXml) {
-     Locale locale = (Locale)context.get("locale");
-     List newProductsInGoogle = FastList.newInstance();
-     List productsRemovedFromGoogle = FastList.newInstance();
-     try {
-     GenericDelegator delegator = dctx.getDelegator();
-     LocalDispatcher dispatcher = dctx.getDispatcher();
-     List selectResult = (List)context.get("selectResult");
-     String webSiteUrl = (String)context.get("webSiteUrl");
-     String imageUrl = (String)context.get("imageUrl");
-     String actionType = (String)context.get("actionType");
-     String statusId = (String)context.get("statusId");
-     String trackingCodeId = (String)context.get("trackingCodeId");
-     String countryCode = (String)context.get("countryCode");
-     String webSiteMountPoint = (String)context.get("webSiteMountPoint");
-
-     if (!webSiteUrl.startsWith("http://") && !webSiteUrl.startsWith("https://")) {
-     webSiteUrl = "http://" + webSiteUrl;
-     }
-     if (webSiteUrl.endsWith("/")) {
-     webSiteUrl = webSiteUrl.substring(0, webSiteUrl.length() - 1);
-     }
-
-     if (webSiteMountPoint.endsWith("/")) {
-     webSiteMountPoint = webSiteMountPoint.substring(0, webSiteMountPoint.length() - 1);
-     }
-     if (webSiteMountPoint.startsWith("/")) {
-     webSiteMountPoint = webSiteMountPoint.substring(1, webSiteMountPoint.length());
-     }
-
-     String productCurrency = null;
-     if ("US".equals(countryCode)) {
-     productCurrency = "USD";
-     } else if ("GB".equals(countryCode)) {
-     productCurrency = "GBP";
-     } else if ("DE".equals(countryCode)) {
-     productCurrency = "EUR";
-     } else {
-     Debug.logError("Exception during building data items to Google, Country Code must be either US, UK or DE: "+countryCode, module);
-     return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToGoogle.invalidCountryCode", locale));
-     }
-     // Get the list of products to be exported to Google Base
-     List productsList  = delegator.findList("Product", EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult), null, null, null, false);
-
-     // Get the tracking code
-     if (UtilValidate.isEmpty(trackingCodeId) || "_NA_".equals(trackingCodeId)) {
-     trackingCodeId = "";
-     } else {
-     trackingCodeId = "?atc=" + trackingCodeId;
-     }
-
-     Document feedDocument = UtilXml.makeEmptyXmlDocument("feed");
-     Element feedElem = feedDocument.getDocumentElement();
-     feedElem.setAttribute("xmlns", "http://www.w3.org/2005/Atom");
-     feedElem.setAttribute("xmlns:openSearch", "http://a9.com/-/spec/opensearchrss/1.0/");
-     feedElem.setAttribute("xmlns:g", "http://base.google.com/ns/1.0");
-     feedElem.setAttribute("xmlns:batch", "http://schemas.google.com/gdata/batch");
-     feedElem.setAttribute("xmlns:app", "http://purl.org/atom/app#");
-
-     // Iterate the product list getting all the relevant data
-     Iterator productsListItr = productsList.iterator();
-     int index = 0;
-     String itemActionType = null;
-     GenericValue googleProduct;
-     while (productsListItr.hasNext()) {
-     itemActionType = actionType;
-     GenericValue prod = (GenericValue)productsListItr.next();
-     String price = getProductPrice(dispatcher, prod);
-     if (price == null) {
-     Debug.logInfo("Price not found for product [" + prod.getString("productId")+ "]; product will not be exported.", module);
-     continue;
-     }
-     // TODO: improve this (i.e. get the relative path from the properies file)
-     String link = webSiteUrl + "/"+webSiteMountPoint+"/control/product/~product_id=" + prod.getString("productId") + trackingCodeId;
-     String title = UtilFormatOut.encodeXmlValue(prod.getString("productName"));
-     String description = UtilFormatOut.encodeXmlValue(prod.getString("description"));
-     String imageLink = "";
-     if (UtilValidate.isNotEmpty(prod.getString("largeImageUrl"))) {
-     imageLink = webSiteUrl + prod.getString("largeImageUrl");
-     } else if (UtilValidate.isNotEmpty(prod.getString("mediumImageUrl"))) {
-     imageLink = webSiteUrl + prod.getString("mediumImageUrl");
-     } else if (UtilValidate.isNotEmpty(prod.getString("smallImageUrl"))) {
-     imageLink = webSiteUrl + prod.getString("smallImageUrl");
-     }
-
-     String googleProductId = null;
-     if (!"insert".equals(actionType)) {
-     try {
-     googleProduct = delegator.findByPrimaryKey("GoodIdentification", UtilMisc.toMap("productId", prod.getString("productId"), "goodIdentificationTypeId", "GOOGLE_ID"));
-     if (UtilValidate.isNotEmpty(googleProduct)) {
-     googleProductId = googleProduct.getString("idValue");
-     }
-     } catch (GenericEntityException gee) {
-     Debug.logError("Unable to obtain GoodIdentification entity value of the Google id for product [" + prod.getString("productId") + "]: " + gee.getMessage(), module);
-     }
-     }
-     if ("update".equals(actionType) && UtilValidate.isEmpty(googleProductId)) {
-     itemActionType = "insert";
-     }
-     Element entryElem = UtilXml.addChildElement(feedElem, "entry", feedDocument);
-     Element batchElem = UtilXml.addChildElement(entryElem, "batch:operation", feedDocument);
-     batchElem.setAttribute("type", itemActionType);
-
-     // status is draft or deactivate
-     if (statusId != null && ("draft".equals(statusId) || "deactivate".equals(statusId))) {
-     Element appControlElem = UtilXml.addChildElement(entryElem, "app:control", feedDocument);
-     UtilXml.addChildElementValue(appControlElem, "app:draft", "yes", feedDocument);
-
-     // status is deactivate
-     if ("deactivate".equals(statusId)) {
-     UtilXml.addChildElement(appControlElem, "gm:disapproved", feedDocument);
-     }
-     }
-
-     UtilXml.addChildElementValue(entryElem, "title", title, feedDocument);
-
-     Element contentElem = UtilXml.addChildElementValue(entryElem, "content", description, feedDocument);
-     contentElem.setAttribute("type", "xhtml");
-
-     if (UtilValidate.isNotEmpty(googleProductId)) {
-     UtilXml.addChildElementValue(entryElem, "id", googleProductId, feedDocument);
-     } else {
-     UtilXml.addChildElementValue(entryElem, "id", link, feedDocument);
-     }
-
-     Element linkElem = UtilXml.addChildElement(entryElem, "link", feedDocument);
-     linkElem.setAttribute("rel", "alternate");
-     linkElem.setAttribute("type", "text/html");
-     linkElem.setAttribute("href", link);
-
-     UtilXml.addChildElementValue(entryElem, "g:item_type", "products", feedDocument);
-     UtilXml.addChildElementValue(entryElem, "g:price", price, feedDocument);
-
-     // Might be nicer to load this from the product but for now we'll set it based on the country destination
-     UtilXml.addChildElementValue(entryElem, "g:currency", productCurrency, feedDocument);
-
-     // Ensure the load goes to the correct country location either US dollar, GB sterling or DE euro
-     UtilXml.addChildElementValue(entryElem, "g:target_country", countryCode, feedDocument);
-
-     UtilXml.addChildElementValue(entryElem, "g:brand", prod.getString("brandName"), feedDocument);
-
-     try {
-     googleProduct = delegator.findByPrimaryKey("GoodIdentification", UtilMisc.toMap("productId", prod.getString("productId"), "goodIdentificationTypeId", "SKU"));
-     if (UtilValidate.isNotEmpty(googleProduct)) {
-     UtilXml.addChildElementValue(entryElem, "g:ean", googleProduct.getString("idValue"), feedDocument);
-     }
-     } catch (GenericEntityException gee) {
-     Debug.logInfo("Unable to get the SKU for product [" + prod.getString("productId") + "]: " + gee.getMessage(), module);
-     }
-
-     UtilXml.addChildElementValue(entryElem, "g:condition", "new", feedDocument);
-     // This is a US specific requirement for product feeds
-     //                     UtilXml.addChildElementValue(entryElem, "g:mpn", "", feedDocument);
-
-     // if the product has an image it will be published on Google Product Search
-     if (UtilValidate.isNotEmpty(imageLink)) {
-     UtilXml.addChildElementValue(entryElem, "g:image_link", imageLink, feedDocument);
-     }
-     // if the product is exported to google for the first time, we add it to the list
-     if ("insert".equals(itemActionType)) {
-     newProductsInGoogle.add(prod.getString("productId"));
-     productsRemovedFromGoogle.add(null);
-     } else if ("delete".equals(itemActionType)) {
-     newProductsInGoogle.add(null);
-     productsRemovedFromGoogle.add(prod.getString("productId"));
-     } else {
-     newProductsInGoogle.add(null);
-     productsRemovedFromGoogle.add(null);
-     }
-     index++;
-     }
-
-     dataItemsXml.append(UtilXml.writeXmlDocument(feedDocument));
-     } catch (IOException e) {
-     return ServiceUtil.returnError("IO Error creating XML document for Google :" + e.getMessage());
-     } catch (GenericEntityException e) {
-     return ServiceUtil.returnError("Unable to read from product entity: "  + e.toString());
-     }
-
-
-     Map result = ServiceUtil.returnSuccess();
-     result.put("newProductsInGoogle", newProductsInGoogle);
-     result.put("productsRemovedFromGoogle", productsRemovedFromGoogle);
-     Debug.log("======returning with result: " + result);
-     return result;
+        Locale locale = (Locale)context.get("locale");
+        List newProductsInGoogle = FastList.newInstance();
+        List productsRemovedFromGoogle = FastList.newInstance();
+        try {
+            GenericDelegator delegator = dctx.getDelegator();
+            LocalDispatcher dispatcher = dctx.getDispatcher();
+            List selectResult = (List)context.get("selectResult");
+            String webSiteUrl = (String)context.get("webSiteUrl");
+            String imageUrl = (String)context.get("imageUrl");
+            String actionType = (String)context.get("actionType");
+            String statusId = (String)context.get("statusId");
+            String trackingCodeId = (String)context.get("trackingCodeId");
+            String countryCode = (String)context.get("countryCode");
+            String webSiteMountPoint = (String)context.get("webSiteMountPoint");
+
+            if (!webSiteUrl.startsWith("http://") && !webSiteUrl.startsWith("https://")) {
+                webSiteUrl = "http://" + webSiteUrl;
+            }
+            if (webSiteUrl.endsWith("/")) {
+                webSiteUrl = webSiteUrl.substring(0, webSiteUrl.length() - 1);
+            }
+
+            if (webSiteMountPoint.endsWith("/")) {
+                webSiteMountPoint = webSiteMountPoint.substring(0, webSiteMountPoint.length() - 1);
+            }
+            if (webSiteMountPoint.startsWith("/")) {
+                webSiteMountPoint = webSiteMountPoint.substring(1, webSiteMountPoint.length());
+            }
+
+            String productCurrency = null;
+            if ("US".equals(countryCode)) {
+                productCurrency = "USD";
+            } else if ("GB".equals(countryCode)) {
+                productCurrency = "GBP";
+            } else if ("DE".equals(countryCode)) {
+                productCurrency = "EUR";
+            } else {
+                Debug.logError("Exception during building data items to Google, Country Code must be either US, UK or DE: "+countryCode, module);
+                return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "productsExportToGoogle.invalidCountryCode", locale));
+            }
+            // Get the list of products to be exported to Google Base
+            List productsList  = delegator.findList("Product", EntityCondition.makeCondition("productId", EntityOperator.IN, selectResult), null, null, null, false);
+
+            // Get the tracking code
+            if (UtilValidate.isEmpty(trackingCodeId) || "_NA_".equals(trackingCodeId)) {
+                trackingCodeId = "";
+            } else {
+                trackingCodeId = "?atc=" + trackingCodeId;
+            }
+
+            Document feedDocument = UtilXml.makeEmptyXmlDocument("feed");
+            Element feedElem = feedDocument.getDocumentElement();
+            feedElem.setAttribute("xmlns", "http://www.w3.org/2005/Atom");
+            feedElem.setAttribute("xmlns:openSearch", "http://a9.com/-/spec/opensearchrss/1.0/");
+            feedElem.setAttribute("xmlns:g", "http://base.google.com/ns/1.0");
+            feedElem.setAttribute("xmlns:batch", "http://schemas.google.com/gdata/batch");
+            feedElem.setAttribute("xmlns:app", "http://purl.org/atom/app#");
+
+            // Iterate the product list getting all the relevant data
+            Iterator productsListItr = productsList.iterator();
+            int index = 0;
+            String itemActionType = null;
+            GenericValue googleProduct;
+            while (productsListItr.hasNext()) {
+                itemActionType = actionType;
+                GenericValue prod = (GenericValue)productsListItr.next();
+                String price = getProductPrice(dispatcher, prod);
+                if (price == null) {
+                    Debug.logInfo("Price not found for product [" + prod.getString("productId")+ "]; product will not be exported.", module);
+                    continue;
+                }
+                // TODO: improve this (i.e. get the relative path from the properies file)
+                String link = webSiteUrl + "/"+webSiteMountPoint+"/control/product/~product_id=" + prod.getString("productId") + trackingCodeId;
+                String title = UtilFormatOut.encodeXmlValue(prod.getString("productName"));
+                String description = UtilFormatOut.encodeXmlValue(prod.getString("description"));
+                String imageLink = "";
+                if (UtilValidate.isNotEmpty(prod.getString("largeImageUrl"))) {
+                    imageLink = webSiteUrl + prod.getString("largeImageUrl");
+                } else if (UtilValidate.isNotEmpty(prod.getString("mediumImageUrl"))) {
+                    imageLink = webSiteUrl + prod.getString("mediumImageUrl");
+                } else if (UtilValidate.isNotEmpty(prod.getString("smallImageUrl"))) {
+                    imageLink = webSiteUrl + prod.getString("smallImageUrl");
+                }
+
+                String googleProductId = null;
+                if (!"insert".equals(actionType)) {
+                    try {
+                        googleProduct = delegator.findByPrimaryKey("GoodIdentification", UtilMisc.toMap("productId", prod.getString("productId"), "goodIdentificationTypeId", "GOOGLE_ID"));
+                        if (UtilValidate.isNotEmpty(googleProduct)) {
+                            googleProductId = googleProduct.getString("idValue");
+                        }
+                    } catch (GenericEntityException gee) {
+                        Debug.logError("Unable to obtain GoodIdentification entity value of the Google id for product [" + prod.getString("productId") + "]: " + gee.getMessage(), module);
+                    }
+                }
+                if ("update".equals(actionType) && UtilValidate.isEmpty(googleProductId)) {
+                    itemActionType = "insert";
+                }
+                Element entryElem = UtilXml.addChildElement(feedElem, "entry", feedDocument);
+                Element batchElem = UtilXml.addChildElement(entryElem, "batch:operation", feedDocument);
+                batchElem.setAttribute("type", itemActionType);
+
+                // status is draft or deactivate
+                if (statusId != null && ("draft".equals(statusId) || "deactivate".equals(statusId))) {
+                    Element appControlElem = UtilXml.addChildElement(entryElem, "app:control", feedDocument);
+                    UtilXml.addChildElementValue(appControlElem, "app:draft", "yes", feedDocument);
+
+                    // status is deactivate
+                    if ("deactivate".equals(statusId)) {
+                        UtilXml.addChildElement(appControlElem, "gm:disapproved", feedDocument);
+                    }
+                }
+
+                UtilXml.addChildElementValue(entryElem, "title", title, feedDocument);
+
+                Element contentElem = UtilXml.addChildElementValue(entryElem, "content", description, feedDocument);
+                contentElem.setAttribute("type", "xhtml");
+
+                if (UtilValidate.isNotEmpty(googleProductId)) {
+                    UtilXml.addChildElementValue(entryElem, "id", googleProductId, feedDocument);
+                } else {
+                    UtilXml.addChildElementValue(entryElem, "id", link, feedDocument);
+                }
+
+                Element linkElem = UtilXml.addChildElement(entryElem, "link", feedDocument);
+                linkElem.setAttribute("rel", "alternate");
+                linkElem.setAttribute("type", "text/html");
+                linkElem.setAttribute("href", link);
+
+                UtilXml.addChildElementValue(entryElem, "g:item_type", "products", feedDocument);
+                UtilXml.addChildElementValue(entryElem, "g:price", price, feedDocument);
+
+                // Might be nicer to load this from the product but for now we'll set it based on the country destination
+                UtilXml.addChildElementValue(entryElem, "g:currency", productCurrency, feedDocument);
+
+                // Ensure the load goes to the correct country location either US dollar, GB sterling or DE euro
+                UtilXml.addChildElementValue(entryElem, "g:target_country", countryCode, feedDocument);
+
+                UtilXml.addChildElementValue(entryElem, "g:brand", prod.getString("brandName"), feedDocument);
+
+                try {
+                    googleProduct = delegator.findByPrimaryKey("GoodIdentification", UtilMisc.toMap("productId", prod.getString("productId"), "goodIdentificationTypeId", "SKU"));
+                    if (UtilValidate.isNotEmpty(googleProduct)) {
+                        UtilXml.addChildElementValue(entryElem, "g:ean", googleProduct.getString("idValue"), feedDocument);
+                    }
+                } catch (GenericEntityException gee) {
+                    Debug.logInfo("Unable to get the SKU for product [" + prod.getString("productId") + "]: " + gee.getMessage(), module);
+                }
+
+                UtilXml.addChildElementValue(entryElem, "g:condition", "new", feedDocument);
+                // This is a US specific requirement for product feeds
+                //                     UtilXml.addChildElementValue(entryElem, "g:mpn", "", feedDocument);
+
+                // if the product has an image it will be published on Google Product Search
+                if (UtilValidate.isNotEmpty(imageLink)) {
+                    UtilXml.addChildElementValue(entryElem, "g:image_link", imageLink, feedDocument);
+                }
+                // if the product is exported to google for the first time, we add it to the list
+                if ("insert".equals(itemActionType)) {
+                    newProductsInGoogle.add(prod.getString("productId"));
+                    productsRemovedFromGoogle.add(null);
+                } else if ("delete".equals(itemActionType)) {
+                    newProductsInGoogle.add(null);
+                    productsRemovedFromGoogle.add(prod.getString("productId"));
+                } else {
+                    newProductsInGoogle.add(null);
+                    productsRemovedFromGoogle.add(null);
+                }
+                index++;
+            }
+
+            dataItemsXml.append(UtilXml.writeXmlDocument(feedDocument));
+        } catch (IOException e) {
+            return ServiceUtil.returnError("IO Error creating XML document for Google :" + e.getMessage());
+        } catch (GenericEntityException e) {
+            return ServiceUtil.returnError("Unable to read from product entity: "  + e.toString());
+        }
+
+
+        Map result = ServiceUtil.returnSuccess();
+        result.put("newProductsInGoogle", newProductsInGoogle);
+        result.put("productsRemovedFromGoogle", productsRemovedFromGoogle);
+        Debug.log("======returning with result: " + result);
+        return result;
     }
 
     private static String getProductPrice(LocalDispatcher dispatcher, GenericValue product) {