This is an automated email from the ASF dual-hosted git repository.
akashjain pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 868c487 Improved: Remove ProductStoreWorker dependencies on ecommerce email screen forms (OFBIZ-9419) 868c487 is described below commit 868c487e7fe3653689e2c7c46105287e02e39be9 Author: Akash Jain <[hidden email]> AuthorDate: Tue Sep 1 14:53:25 2020 +0530 Improved: Remove ProductStoreWorker dependencies on ecommerce email screen forms (OFBIZ-9419) Thanks, Taher Alkhateeb for report. --- .../payment/GiftCertificateServices.java | 12 ++------- .../thirdparty/valuelink/ValueLinkServices.java | 12 ++------- .../ofbiz/order/order/OrderReturnServices.java | 6 +---- .../apache/ofbiz/order/order/OrderServices.java | 6 +---- .../ofbiz/product/store/ProductStoreWorker.java | 29 ---------------------- 5 files changed, 6 insertions(+), 59 deletions(-) diff --git a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java index f281a59..0032a12 100644 --- a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java +++ b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/GiftCertificateServices.java @@ -899,11 +899,7 @@ public class GiftCertificateServices { } } Map<String, Object> emailCtx = new HashMap<>(); - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - emailCtx.put("bodyScreenUri", bodyScreenLocation); + emailCtx.put("bodyScreenUri", productStoreEmail.getString("bodyScreenLocation")); emailCtx.put("bodyParameters", answerMap); emailCtx.put("sendTo", sendToEmail); emailCtx.put("contentType", productStoreEmail.get("contentType")); @@ -1122,11 +1118,7 @@ public class GiftCertificateServices { answerMap.put("locale", locale); Map<String, Object> emailCtx = new HashMap<>(); - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - emailCtx.put("bodyScreenUri", bodyScreenLocation); + emailCtx.put("bodyScreenUri", productStoreEmail.getString("bodyScreenLocation")); emailCtx.put("bodyParameters", answerMap); emailCtx.put("sendTo", orh.getOrderEmailString()); emailCtx.put("contentType", productStoreEmail.get("contentType")); diff --git a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java index 008779a..cf8ac52 100644 --- a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java +++ b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java @@ -1208,11 +1208,7 @@ public class ValueLinkServices { } Map<String, Object> emailCtx = new HashMap<>(); - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - emailCtx.put("bodyScreenUri", bodyScreenLocation); + emailCtx.put("bodyScreenUri", productStoreEmail.getString("bodyScreenLocation")); emailCtx.put("bodyParameters", answerMap); emailCtx.put("sendTo", sendToEmail); emailCtx.put("contentType", productStoreEmail.get("contentType")); @@ -1445,11 +1441,7 @@ public class ValueLinkServices { Map<String, Object> emailCtx = new HashMap<>(); answerMap.put("locale", locale); - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - emailCtx.put("bodyScreenUri", bodyScreenLocation); + emailCtx.put("bodyScreenUri", productStoreEmail.getString("bodyScreenLocation")); emailCtx.put("bodyParameters", answerMap); emailCtx.put("sendTo", orh.getOrderEmailString()); emailCtx.put("contentType", productStoreEmail.get("contentType")); diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java index 2f516c5..4527aae 100644 --- a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java +++ b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReturnServices.java @@ -252,11 +252,7 @@ public class OrderReturnServices { } if (productStoreEmail != null && emailAddress != null) { - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - sendMap.put("bodyScreenUri", bodyScreenLocation); + sendMap.put("bodyScreenUri", productStoreEmail.getString("bodyScreenLocation")); String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation"); sendMap.put("xslfoAttachScreenLocation", xslfoAttachScreenLocation); diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java index 25337be..3cebfe5 100644 --- a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java +++ b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java @@ -2754,11 +2754,7 @@ public class OrderServices { // the override screenUri if (UtilValidate.isEmpty(screenUri)) { - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - sendMap.put("bodyScreenUri", bodyScreenLocation); + sendMap.put("bodyScreenUri", productStoreEmail.getString("bodyScreenLocation")); String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation"); sendMap.put("xslfoAttachScreenLocation", xslfoAttachScreenLocation); diff --git a/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java b/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java index de1bcd5..8165910 100644 --- a/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java +++ b/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreWorker.java @@ -55,31 +55,6 @@ import org.apache.ofbiz.webapp.website.WebSiteWorker; public final class ProductStoreWorker { private static final String MODULE = ProductStoreWorker.class.getName(); - private static Map<String, String> defaultProductStoreEmailScreenLocation = new HashMap<>(); - - static { - defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CONFIRM", "component://ecommerce/widget/EmailOrderScreens.xml#OrderConfirmNotice"); - defaultProductStoreEmailScreenLocation.put("PRDS_ODR_COMPLETE", "component://ecommerce/widget/EmailOrderScreens.xml#OrderCompleteNotice"); - defaultProductStoreEmailScreenLocation.put("PRDS_ODR_BACKORDER", "component://ecommerce/widget/EmailOrderScreens.xml#BackorderNotice"); - defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CHANGE", "component://ecommerce/widget/EmailOrderScreens.xml#OrderChangeNotice"); - - defaultProductStoreEmailScreenLocation.put("PRDS_ODR_PAYRETRY", "component://ecommerce/widget/EmailOrderScreens.xml#PaymentRetryNotice"); - - defaultProductStoreEmailScreenLocation.put("PRDS_RTN_ACCEPT", "component://ecommerce/widget/EmailReturnScreens.xml#ReturnAccept"); - defaultProductStoreEmailScreenLocation.put("PRDS_RTN_COMPLETE", "component://ecommerce/widget/EmailReturnScreens.xml#ReturnComplete"); - defaultProductStoreEmailScreenLocation.put("PRDS_RTN_CANCEL", "component://ecommerce/widget/EmailReturnScreens.xml#ReturnCancel"); - - defaultProductStoreEmailScreenLocation.put("PRDS_GC_PURCHASE", "component://ecommerce/widget/EmailGiftCardScreens.xml#GiftCardPurchase"); - defaultProductStoreEmailScreenLocation.put("PRDS_GC_RELOAD", "component://ecommerce/widget/EmailGiftCardScreens.xml#GiftCardReload"); - - defaultProductStoreEmailScreenLocation.put("PRDS_QUO_CONFIRM", "component://order/widget/ordermgr/QuoteScreens.xml#ViewQuoteSimple"); - - defaultProductStoreEmailScreenLocation.put("PRDS_PWD_RETRIEVE", "component://securityext/widget/EmailSecurityScreens.xml#PasswordEmail"); - - defaultProductStoreEmailScreenLocation.put("PRDS_TELL_FRIEND", "component://ecommerce/widget/EmailProductScreens.xml#TellFriend"); - - defaultProductStoreEmailScreenLocation.put("PRDS_CUST_REGISTER", "component://securityext/widget/EmailSecurityScreens.xml#PasswordEmail"); - } private ProductStoreWorker() { } @@ -716,8 +691,4 @@ public final class ProductStoreWorker { return false; } } - - public static String getDefaultProductStoreEmailScreenLocation(String emailType) { - return defaultProductStoreEmailScreenLocation.get(emailType); - } } |
Free forum by Nabble | Edit this page |