You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2016/09/03 12:22:15 UTC

svn commit: r1759083 - in /ofbiz/trunk/specialpurpose/oagis: config/OagisUiLabels.xml src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java src/main/java/org/apache/ofbiz/oagis/OagisServices.java

Author: deepak
Date: Sat Sep  3 12:22:15 2016
New Revision: 1759083

URL: http://svn.apache.org/viewvc?rev=1759083&view=rev
Log:
(OFBIZ-7993) Applied patch from jira issue
=====================================
Add UI labels for success / error messages in oagis component
=====================================
Thanks Tanmay for your contribution.

Modified:
    ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml
    ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java
    ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java

Modified: ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml?rev=1759083&r1=1759082&r2=1759083&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml Sat Sep  3 12:22:15 2016
@@ -337,6 +337,9 @@
         <value xml:lang="zh">执行退货标识(returnId)${returnId}、订单标识(orderId)${orderId}的投递消息${omiPkMap}时发生系统错误</value>
         <value xml:lang="zh-TW">執行退貨識別(returnId)${returnId}、訂單識別(orderId)${orderId}的投遞訊息${omiPkMap}時發生系統錯誤</value>
     </property>
+    <property key="OagisFoundBusinessLevelErrorsInMessageProcessing">
+        <value xml:lang="en">Found business level errors in message processing, not saving results; first error is: </value>
+    </property>
     <property key="OagisFoundExistingMessage">
         <value xml:lang="en">Found existing message info(s) in OAGMP_OGEN_SUCCESS, so not sending Process Shipment message for order ${orderId} existing message(s) are: </value>
         <value xml:lang="it">Trovati informazioni messaggi esistenti in OAGMP_OGEN_SUCCESS, così nessun messaggio inviato Process Shipment message per l'ordine ${orderId} messaggi esistenti sono: </value>
@@ -527,6 +530,12 @@
         <value xml:lang="zh">数量差异</value>
         <value xml:lang="zh-TW">數量差異</value>
     </property>
+    <property key="OagisSystemErrorProcessingAcknowledgeDeliveryRMAMessage">
+        <value xml:lang="en">System Error processing Acknowledge Delivery RMA message for message [${omiPkMap}]: </value>
+    </property>
+    <property key="OagisSystemErrorProcessingAcknowledgeDeliveryStatusMssage">
+        <value xml:lang="en">System Error processing Acknowledge Delivery Status message for message [${omiPkMap}]: </value>
+    </property>
     <property key="PageTitleOagisInventoryMismatchNotice">
         <value xml:lang="en">Inventory Mismatch Notice</value>
         <value xml:lang="fr">Notice de disparité de stock</value>

Modified: ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java?rev=1759083&r1=1759082&r2=1759083&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java Sat Sep  3 12:22:15 2016
@@ -1060,7 +1060,7 @@ public class OagisInventoryServices {
                     }
                 }
             } catch (Throwable t) {
-                String errMsg = "System Error processing Acknowledge Delivery RMA message for message [" + omiPkMap + "]: " + t.toString();
+                String errMsg = UtilProperties.getMessage(resource, "OagisSystemErrorProcessingAcknowledgeDeliveryRMAMessage", UtilMisc.toMap("omiPkMap", omiPkMap), locale) + t.toString();
                 errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError"));
 
                 try {
@@ -1127,7 +1127,7 @@ public class OagisInventoryServices {
                 String errMsg = "Error sending Confirm BOD: " + e.toString();
                 Debug.logError(e, errMsg, module);
             }
-            String errMsg = "Found business level errors in message processing, not saving results; first error is: " + errorMapList.get(0);
+            String errMsg = UtilProperties.getMessage(resource, "OagisFoundBusinessLevelErrorsInMessageProcessing", locale) + errorMapList.get(0);
 
             // return success here so that the message won't be retried and the Confirm BOD, etc won't be sent multiple times
             result.putAll(ServiceUtil.returnSuccess(errMsg));
@@ -1394,7 +1394,7 @@ public class OagisInventoryServices {
                     }
                 }
             } catch (Throwable t) {
-                String errMsg = "System Error processing Acknowledge Delivery Status message for message [" + omiPkMap + "]: " + t.toString();
+                String errMsg = UtilProperties.getMessage(resource, "OagisSystemErrorProcessingAcknowledgeDeliveryStatusMssage", UtilMisc.toMap("omiPkMap", omiPkMap), locale) + t.toString();
                 errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError"));
 
                 try {
@@ -1453,7 +1453,7 @@ public class OagisInventoryServices {
                 Debug.logError(e, errMsg, module);
             }
 
-            String errMsg = "Found business level errors in message processing, not saving results; first error is: " + errorMapList.get(0);
+            String errMsg = UtilProperties.getMessage(resource, "OagisFoundBusinessLevelErrorsInMessageProcessing", locale) + errorMapList.get(0);
 
             // return success here so that the message won't be retried and the Confirm BOD, etc won't be sent multiple times
             result.putAll(ServiceUtil.returnSuccess(errMsg));

Modified: ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java?rev=1759083&r1=1759082&r2=1759083&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java Sat Sep  3 12:22:15 2016
@@ -556,7 +556,7 @@ public class OagisServices {
                 // there was an error last time, tell the service this is a retry
                 messageProcessContext.put("isErrorRetry", Boolean.TRUE);
             } else {
-                String responseMsg = "Message already received with ID: " + oagisMessageInfoKey;
+                String responseMsg = UtilProperties.getMessage(resource, "OagisMessageAlreadyReceived", UtilMisc.toMap("newEntity", oagisMessageInfoKey), locale);
                 Debug.logError(responseMsg, module);
 
                 List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.<String, String>toMap("reasonCode", "MessageAlreadyReceived", "description", responseMsg));