svn commit: r634226 - in /ofbiz/trunk/specialpurpose: googlebase/data/GoogleBaseSecurityData.xml googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java hhfacility/widget/hhfacility/FacilityScreens.xml

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

svn commit: r634226 - in /ofbiz/trunk/specialpurpose: googlebase/data/GoogleBaseSecurityData.xml googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java hhfacility/widget/hhfacility/FacilityScreens.xml

ChrisG-2
Author: chrisg
Date: Thu Mar  6 03:33:26 2008
New Revision: 634226

URL: http://svn.apache.org/viewvc?rev=634226&view=rev
Log:
Setting svn properties (svn:eol-style,svn:mime-type,svn:keywords)

Modified:
    ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml   (contents, props changed)
    ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java   (contents, props changed)
    ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml   (props changed)

Modified: ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml?rev=634226&r1=634225&r2=634226&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml (original)
+++ ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml Thu Mar  6 03:33:26 2008
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-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
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<entity-engine-xml>
-    <!-- Google Base component security -->
-    <SecurityPermission description="View operations in the Google Base application." permissionId="GOOGLEBASE_VIEW"/>
-
-    <SecurityGroupPermission groupId="FLEXADMIN" permissionId="GOOGLEBASE_VIEW"/>
-    <SecurityGroupPermission groupId="FULLADMIN" permissionId="GOOGLEBASE_VIEW"/>
-    <SecurityGroupPermission groupId="VIEWADMIN" permissionId="GOOGLEBASE_VIEW"/>
-    <SecurityGroupPermission groupId="BIZADMIN" permissionId="GOOGLEBASE_VIEW"/>
-
-</entity-engine-xml>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+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
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<entity-engine-xml>
+    <!-- Google Base component security -->
+    <SecurityPermission description="View operations in the Google Base application." permissionId="GOOGLEBASE_VIEW"/>
+
+    <SecurityGroupPermission groupId="FLEXADMIN" permissionId="GOOGLEBASE_VIEW"/>
+    <SecurityGroupPermission groupId="FULLADMIN" permissionId="GOOGLEBASE_VIEW"/>
+    <SecurityGroupPermission groupId="VIEWADMIN" permissionId="GOOGLEBASE_VIEW"/>
+    <SecurityGroupPermission groupId="BIZADMIN" permissionId="GOOGLEBASE_VIEW"/>
+
+</entity-engine-xml>

Propchange: ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/googlebase/data/GoogleBaseSecurityData.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java?rev=634226&r1=634225&r2=634226&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java (original)
+++ ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java Thu Mar  6 03:33:26 2008
@@ -1,147 +1,147 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *******************************************************************************/
-package org.ofbiz.googlebase;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.StringUtil;
-import org.ofbiz.base.util.UtilHttp;
-import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.UtilProperties;
-import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.GenericValue;
-import org.ofbiz.entity.transaction.GenericTransactionException;
-import org.ofbiz.entity.transaction.TransactionUtil;
-import org.ofbiz.entity.util.EntityListIterator;
-import org.ofbiz.product.product.ProductSearchEvents;
-import org.ofbiz.service.GenericServiceException;
-import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.service.ModelService;
-import org.ofbiz.service.ServiceUtil;
-
-public class GoogleBaseSearchEvents {
-
-    public static final String module = GoogleBaseSearchEvents.class.getName();
-    public static final String resource = "GoogleBaseUiLabels";
-    public static final int DEFAULT_TX_TIMEOUT = 600;
-
-    public static String searchExportProductListToGoogle(HttpServletRequest request, HttpServletResponse response) {
-        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-        Locale locale = UtilHttp.getLocale(request);
-        GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
-        String selectResult = (String) request.getParameter("selectResult");
-        List productExportList = new ArrayList();
-        String errMsg = null;
-        
-        try {
-            boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT);
-            try {
-                if (UtilValidate.isEmpty(selectResult)) {
-                    // If the passed list of product ids is empty, get the list from the search parameters in the request
-                    EntityListIterator eli = ProductSearchEvents.getProductSearchResults(request);
-                    if (eli == null) {
-                        errMsg = UtilProperties.getMessage(resource,"googlebasesearchevents.no_results_found_probably_error_constraints", UtilHttp.getLocale(request));
-                        Debug.logError(errMsg, module);
-                        request.setAttribute("_ERROR_MESSAGE_", errMsg);
-                        return "error";
-                    }
-    
-                    GenericValue searchResultView = null;
-                    while ((searchResultView = (GenericValue) eli.next()) != null) {
-                        productExportList.add(searchResultView.getString("mainProductId"));
-                    }
-                    eli.close();
-                } else {
-                    if (selectResult.startsWith("[")) {
-                        productExportList = StringUtil.toList(selectResult);
-                    } else {
-                        productExportList.add(selectResult);
-                    }
-                }
-                String webSiteUrl = (String) request.getParameter("webSiteUrl");
-                String imageUrl = (String) request.getParameter("imageUrl");
-                String actionType = (String) request.getParameter("actionType");
-                String statusId = (String) request.getParameter("statusId");
-                String testMode = (String) request.getParameter("testMode");
-                String trackingCodeId = (String) request.getParameter("trackingCodeId");
-                String webSiteMountPoint = (String) request.getParameter("webSiteMountPoint");
-                String countryCode = (String) request.getParameter("countryCode");
-                
-                // Export all or selected products to Google Base
-                try {
-                    Map inMap = UtilMisc.toMap("selectResult", productExportList,
-                                               "webSiteUrl", webSiteUrl,
-                                               "imageUrl", imageUrl,
-                                               "actionType", actionType,
-                                               "statusId", statusId,
-                                               "testMode", testMode,
-                                               "webSiteMountPoint", webSiteMountPoint,
-                                               "countryCode", countryCode);
-                    inMap.put("trackingCodeId", trackingCodeId);
-                    inMap.put("userLogin", userLogin);
-                    Map exportResult = dispatcher.runSync("exportToGoogle", inMap);
-                    if (ServiceUtil.isError(exportResult)) {
-                        List errorMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
-                        if (UtilValidate.isNotEmpty(errorMessages)) {
-                            request.setAttribute("_ERROR_MESSAGE_LIST_", errorMessages);
-                        } else {
-                            request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
-                        }
-                        return "error";
-                    } else if (ServiceUtil.isFailure(exportResult)) {
-                        List eventMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
-                        if (UtilValidate.isNotEmpty(eventMessages)) {
-                            request.setAttribute("_EVENT_MESSAGE_LIST_", eventMessages);
-                        } else {
-                            request.setAttribute("_EVENT_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
-                        }
-                    } else {
-                        request.setAttribute("_EVENT_MESSAGE_", exportResult.get("successMessage"));
-                    }
-                } catch (GenericServiceException e) {
-                    errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.exceptionCallingExportToGoogle", locale);
-                    Debug.logError(e, errMsg, module);
-                    request.setAttribute("_ERROR_MESSAGE_", errMsg);
-                    return "error";
-                }
-            } catch (GenericEntityException e) {
-                errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.error_getting_search_results", locale);
-                Debug.logError(e, errMsg, module);
-                request.setAttribute("_ERROR_MESSAGE_", errMsg);
-                return "error";
-            } finally {
-                TransactionUtil.commit(beganTransaction);
-            }
-        } catch (GenericTransactionException e) {
-            errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.error_getting_search_results", locale);
-            Debug.logError(e, errMsg, module);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-        return "success";
-    }
-}
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *******************************************************************************/
+package org.ofbiz.googlebase;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilHttp;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.transaction.GenericTransactionException;
+import org.ofbiz.entity.transaction.TransactionUtil;
+import org.ofbiz.entity.util.EntityListIterator;
+import org.ofbiz.product.product.ProductSearchEvents;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ModelService;
+import org.ofbiz.service.ServiceUtil;
+
+public class GoogleBaseSearchEvents {
+
+    public static final String module = GoogleBaseSearchEvents.class.getName();
+    public static final String resource = "GoogleBaseUiLabels";
+    public static final int DEFAULT_TX_TIMEOUT = 600;
+
+    public static String searchExportProductListToGoogle(HttpServletRequest request, HttpServletResponse response) {
+        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
+        Locale locale = UtilHttp.getLocale(request);
+        GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
+        String selectResult = (String) request.getParameter("selectResult");
+        List productExportList = new ArrayList();
+        String errMsg = null;
+        
+        try {
+            boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT);
+            try {
+                if (UtilValidate.isEmpty(selectResult)) {
+                    // If the passed list of product ids is empty, get the list from the search parameters in the request
+                    EntityListIterator eli = ProductSearchEvents.getProductSearchResults(request);
+                    if (eli == null) {
+                        errMsg = UtilProperties.getMessage(resource,"googlebasesearchevents.no_results_found_probably_error_constraints", UtilHttp.getLocale(request));
+                        Debug.logError(errMsg, module);
+                        request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                        return "error";
+                    }
+    
+                    GenericValue searchResultView = null;
+                    while ((searchResultView = (GenericValue) eli.next()) != null) {
+                        productExportList.add(searchResultView.getString("mainProductId"));
+                    }
+                    eli.close();
+                } else {
+                    if (selectResult.startsWith("[")) {
+                        productExportList = StringUtil.toList(selectResult);
+                    } else {
+                        productExportList.add(selectResult);
+                    }
+                }
+                String webSiteUrl = (String) request.getParameter("webSiteUrl");
+                String imageUrl = (String) request.getParameter("imageUrl");
+                String actionType = (String) request.getParameter("actionType");
+                String statusId = (String) request.getParameter("statusId");
+                String testMode = (String) request.getParameter("testMode");
+                String trackingCodeId = (String) request.getParameter("trackingCodeId");
+                String webSiteMountPoint = (String) request.getParameter("webSiteMountPoint");
+                String countryCode = (String) request.getParameter("countryCode");
+                
+                // Export all or selected products to Google Base
+                try {
+                    Map inMap = UtilMisc.toMap("selectResult", productExportList,
+                                               "webSiteUrl", webSiteUrl,
+                                               "imageUrl", imageUrl,
+                                               "actionType", actionType,
+                                               "statusId", statusId,
+                                               "testMode", testMode,
+                                               "webSiteMountPoint", webSiteMountPoint,
+                                               "countryCode", countryCode);
+                    inMap.put("trackingCodeId", trackingCodeId);
+                    inMap.put("userLogin", userLogin);
+                    Map exportResult = dispatcher.runSync("exportToGoogle", inMap);
+                    if (ServiceUtil.isError(exportResult)) {
+                        List errorMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
+                        if (UtilValidate.isNotEmpty(errorMessages)) {
+                            request.setAttribute("_ERROR_MESSAGE_LIST_", errorMessages);
+                        } else {
+                            request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
+                        }
+                        return "error";
+                    } else if (ServiceUtil.isFailure(exportResult)) {
+                        List eventMessages = (List)exportResult.get(ModelService.ERROR_MESSAGE_LIST);
+                        if (UtilValidate.isNotEmpty(eventMessages)) {
+                            request.setAttribute("_EVENT_MESSAGE_LIST_", eventMessages);
+                        } else {
+                            request.setAttribute("_EVENT_MESSAGE_", ServiceUtil.getErrorMessage(exportResult));
+                        }
+                    } else {
+                        request.setAttribute("_EVENT_MESSAGE_", exportResult.get("successMessage"));
+                    }
+                } catch (GenericServiceException e) {
+                    errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.exceptionCallingExportToGoogle", locale);
+                    Debug.logError(e, errMsg, module);
+                    request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                    return "error";
+                }
+            } catch (GenericEntityException e) {
+                errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.error_getting_search_results", locale);
+                Debug.logError(e, errMsg, module);
+                request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                return "error";
+            } finally {
+                TransactionUtil.commit(beganTransaction);
+            }
+        } catch (GenericTransactionException e) {
+            errMsg = UtilProperties.getMessage(resource, "googlebasesearchevents.error_getting_search_results", locale);
+            Debug.logError(e, errMsg, module);
+            request.setAttribute("_ERROR_MESSAGE_", errMsg);
+            return "error";
+        }
+        return "success";
+    }
+}

Propchange: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/googlebase/src/org/ofbiz/googlebase/GoogleBaseSearchEvents.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native