Author: jleroux
Date: Fri Aug 11 19:06:44 2017
New Revision: 1804840

URL: http://svn.apache.org/viewvc?rev=1804840&view=rev
Log:
Improved: Deprecated Methods in OrderChangeHelper
(OFBIZ-9570)

The methods abortOrderProcessing and releaseInitialOrderHold have been 
deprecated since the workflow engine has been replaced by the ECA. 
Both methods only return _true_ and other code code that uses these methods 
is deprecated as well.

https://svn.apache.org/viewvc?view=revision&revision=665981
The revision in OrderChangeHelper shows that the methods used to have a 
comment which stated that the methods are no longer in use.

jleroux: remove the 2 methods and all useless related code


Thanks: Kyra Pritzel-Hentley for starting the analysis and creating the Jira

Modified:
    
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
    
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
    
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
    
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderChangeHelper.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/ideal/IdealEvents.java?rev=1804840&r1=1804839&r2=1804840&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
 Fri Aug 11 19:06:44 2017
@@ -292,8 +292,6 @@ public class IdealEvents {
         }
         if (okay) {
             request.setAttribute("_EVENT_MESSAGE_", 
UtilProperties.getMessage(resource, "IdealSuccessful", locale));
-            // attempt to release the offline hold on the order (workflow)
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
             // call the email confirm service
             Map<String, String> emailContext = UtilMisc.toMap("orderId", 
orderId, "userLogin", userLogin);
             try {

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java?rev=1804840&r1=1804839&r2=1804840&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
 Fri Aug 11 19:06:44 2017
@@ -339,9 +339,6 @@ public class PayPalEvents {
 
 
         if (okay) {
-            // attempt to release the offline hold on the order (workflow)
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
-
             // call the email confirm service
             Map <String, String> emailContext = UtilMisc.toMap("orderId", 
orderId);
             try {
@@ -388,10 +385,6 @@ public class PayPalEvents {
             }
         }
 
-        // attempt to release the offline hold on the order (workflow)
-        if (okay)
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
-
         request.setAttribute("_EVENT_MESSAGE_", 
UtilProperties.getMessage(resourceErr, 
"payPalEvents.previousPayPalOrderHasBeenCancelled", locale));
         return "success";
     }

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java?rev=1804840&r1=1804839&r2=1804840&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
 Fri Aug 11 19:06:44 2017
@@ -388,8 +388,6 @@ public class WorldPayEvents {
             }
         }
         if (okay) {
-            // attempt to release the offline hold on the order (workflow)
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
             // call the email confirm service
             Map<String, Object> emailContext = UtilMisc.toMap("orderId", 
orderId, "userLogin", userLogin);
             try {

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderChangeHelper.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderChangeHelper.java?rev=1804840&r1=1804839&r2=1804840&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderChangeHelper.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderChangeHelper.java
 Fri Aug 11 19:06:44 2017
@@ -72,7 +72,6 @@ public final class OrderChangeHelper {
 
         try {
             OrderChangeHelper.orderStatusChanges(dispatcher, userLogin, 
orderId, HEADER_STATUS, "ITEM_CREATED", ITEM_STATUS, DIGITAL_ITEM_STATUS);
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
         } catch (GenericServiceException e) {
             Debug.logError(e, "Service invocation error, status changes were 
not updated for order #" + orderId, module);
             return false;
@@ -96,7 +95,6 @@ public final class OrderChangeHelper {
             OrderChangeHelper.orderStatusChanges(dispatcher, userLogin, 
orderId, HEADER_STATUS, null, ITEM_STATUS, null);
             OrderChangeHelper.cancelInventoryReservations(dispatcher, 
userLogin, orderId);
             OrderChangeHelper.releasePaymentAuthorizations(dispatcher, 
userLogin,orderId);
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
         } catch (GenericServiceException e) {
             Debug.logError(e, "Service invocation error, status changes were 
not updated for order #" + orderId, module);
             return false;
@@ -134,7 +132,6 @@ public final class OrderChangeHelper {
             OrderChangeHelper.orderStatusChanges(dispatcher, userLogin, 
orderId, HEADER_STATUS, null, ITEM_STATUS, null);
             OrderChangeHelper.cancelInventoryReservations(dispatcher, 
userLogin, orderId);
             OrderChangeHelper.releasePaymentAuthorizations(dispatcher, 
userLogin,orderId);
-            OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
         } catch (GenericServiceException e) {
             Debug.logError(e, "Service invocation error, status changes were 
not updated for order #" + orderId, module);
             return false;
@@ -289,13 +286,4 @@ public final class OrderChangeHelper {
             }
         }
     }
-
-
-    public static boolean releaseInitialOrderHold(LocalDispatcher dispatcher, 
String orderId) {
-        return true;
-    }
-
-    public static boolean abortOrderProcessing(LocalDispatcher dispatcher, 
String orderId) {
-        return true;
-    }
 }


Reply via email to