Author: erwan
Date: Mon Dec 5 15:19:33 2011 New Revision: 1210493 URL: http://svn.apache.org/viewvc?rev=1210493&view=rev Log: OBFIZ-3894 patch Modified: ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java ofbiz/branches/20111205EmailHandling/applications/content/config/ContentUiLabels.xml ofbiz/branches/20111205EmailHandling/applications/content/entitydef/entitymodel.xml ofbiz/branches/20111205EmailHandling/applications/content/webapp/content/WEB-INF/controller.xml ofbiz/branches/20111205EmailHandling/applications/content/widget/EmailScreens.xml ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupForms.xml ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupMenus.xml ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupScreens.xml ofbiz/branches/20111205EmailHandling/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/quote/QuoteServices.java ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/party/PartyServices.xml ofbiz/branches/20111205EmailHandling/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java ofbiz/branches/20111205EmailHandling/applications/product/config/ProductUiLabels.xml ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel.xml ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel_view.xml ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/UpgradeServices.xml ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_store.xml ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_upgrade.xml ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/product/product/ProductEvents.java ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java ofbiz/branches/20111205EmailHandling/applications/product/webapp/catalog/WEB-INF/controller.xml ofbiz/branches/20111205EmailHandling/applications/product/widget/catalog/CatalogMenus.xml ofbiz/branches/20111205EmailHandling/applications/product/widget/catalog/ProductStoreForms.xml ofbiz/branches/20111205EmailHandling/applications/product/widget/catalog/StoreScreens.xml ofbiz/branches/20111205EmailHandling/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java ofbiz/branches/20111205EmailHandling/debian/override-data.xslt ofbiz/branches/20111205EmailHandling/framework/common/config/CommonUiLabels.xml ofbiz/branches/20111205EmailHandling/framework/common/config/general.properties ofbiz/branches/20111205EmailHandling/framework/common/script/org/ofbiz/common/email/EmailServices.xml ofbiz/branches/20111205EmailHandling/framework/common/servicedef/services_email.xml ofbiz/branches/20111205EmailHandling/framework/common/webcommon/WEB-INF/common-controller.xml ofbiz/branches/20111205EmailHandling/framework/common/widget/LookupForms.xml ofbiz/branches/20111205EmailHandling/framework/common/widget/LookupScreens.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/data/DemoEbayStoreData.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStoreAutoPreferences.java ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/widget/EbayEmailScreens.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ecommerce/data/DemoProduct.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ecommerce/data/DemoRentalProduct.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml ofbiz/branches/20111205EmailHandling/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy ofbiz/branches/20111205EmailHandling/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Modified: ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java Mon Dec 5 15:19:33 2011 @@ -885,7 +885,7 @@ public class GiftCertificateServices { GenericValue productStoreEmail = null; String emailType = "PRDS_GC_PURCHASE"; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); } catch (GenericEntityException e) { Debug.logError(e, "Unable to get product store email setting for gift card purchase", module); @@ -1133,7 +1133,7 @@ public class GiftCertificateServices { GenericValue productStoreEmail = null; String emailType = "PRDS_GC_RELOAD"; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); } catch (GenericEntityException e) { Debug.logError(e, "Unable to get product store email setting for gift card purchase", module); } Modified: ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java Mon Dec 5 15:19:33 2011 @@ -1263,7 +1263,7 @@ public class ValueLinkServices { GenericValue productStoreEmail = null; String emailType = "PRDS_GC_PURCHASE"; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); } catch (GenericEntityException e) { Debug.logError(e, "Unable to get product store email setting for gift card purchase", module); } @@ -1517,7 +1517,7 @@ public class ValueLinkServices { GenericValue productStoreEmail = null; String emailType = "PRDS_GC_RELOAD"; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); } catch (GenericEntityException e) { Debug.logError(e, "Unable to get product store email setting for gift card purchase", module); } Modified: ofbiz/branches/20111205EmailHandling/applications/content/config/ContentUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/config/ContentUiLabels.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/config/ContentUiLabels.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/config/ContentUiLabels.xml Mon Dec 5 15:19:33 2011 @@ -5197,6 +5197,10 @@ <value xml:lang="zh">æ°å»ºæ°æ®èµæºç½å</value> <value xml:lang="zh_TW">æ°å»ºè³æè³æºç¶²å</value> </property> + <property key="PageTitleAddEmailTemplateSetup"> + <value xml:lang="en">Add Email Template Setting</value> + <value xml:lang="fr">Ajouter un template de mél</value> + </property> <property key="PageTitleAddForumMessage"> <value xml:lang="ar">إضاÙØ© رساÙØ© Ø¥Ù٠اÙÙ ÙتدÙ</value> <value xml:lang="da">Tilføj en besked til forum: </value> @@ -5832,6 +5836,10 @@ <value xml:lang="zh">ç¼è¾çµåææ¬</value> <value xml:lang="zh_TW">編輯é»åææ¬</value> </property> + <property key="PageTitleEditEmailTemplateSetup"> + <value xml:lang="en">Edit Email Template Setting</value> + <value xml:lang="fr">Modifier les modèles de mèl</value> + </property> <property key="PageTitleEditForumMessage"> <value xml:lang="ar">تØرÙر رساÙØ©</value> <value xml:lang="da">Ret besked</value> Modified: ofbiz/branches/20111205EmailHandling/applications/content/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/entitydef/entitymodel.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/entitydef/entitymodel.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/entitydef/entitymodel.xml Mon Dec 5 15:19:33 2011 @@ -1124,6 +1124,47 @@ under the License. </entity> <!-- ========================================================= --> + <!-- org.ofbiz.content.email --> + <!-- ========================================================= --> + + <entity entity-name="EmailTemplateContent" + package-name="org.ofbiz.content.email" + title="Email Template And Content Association Entity"> + <field name="emailTemplateSettingId" type="id-ne"/> + <field name="contentId" type="id-ne"/> + <field name="emailTemplateContentTypeId" type="id-ne"/> + <field name="fromDate" type="date-time"/> + <field name="thruDate" type="date-time"/> + <field name="description" type="description"/> + <prim-key field="emailTemplateContentTypeId"/> + <prim-key field="emailTemplateSettingId"/> + <prim-key field="contentId"/> + <prim-key field="fromDate"/> + <relation type="one" rel-entity-name="EmailTemplateSetting" fk-name="ETCONTENT_EMA"> + <key-map field-name="emailTemplateSettingId"/> + </relation> + <relation type="one" rel-entity-name="EmailTemplateContentType" fk-name="ETCONTENT_TYP"> + <key-map field-name="emailTemplateContentTypeId"/> + </relation> + <relation type="one" rel-entity-name="Content" fk-name="ETCONTENT_CON"> + <key-map field-name="contentId"/> + </relation> + </entity> + + <entity entity-name="EmailTemplateContentType" + package-name="org.ofbiz.content.email" + title="Email Template Content Type Entity"> + <field name="emailTemplateContentTypeId" type="id-ne"/> + <field name="parentTypeId" type="id-ne"/> + <field name="hasTable" type="indicator"/> + <field name="description" type="description"/> + <prim-key field="emailTemplateContentTypeId"/> + <relation type="one" fk-name="PARENT_ETCT" title="Parent" rel-entity-name="EmailTemplateContentType"> + <key-map field-name="parentTypeId" rel-field-name="emailTemplateContentTypeId"/> + </relation> + </entity> + + <!-- ========================================================= --> <!-- org.ofbiz.content.preference --> <!-- ========================================================= --> Modified: ofbiz/branches/20111205EmailHandling/applications/content/webapp/content/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/webapp/content/WEB-INF/controller.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/webapp/content/WEB-INF/controller.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/webapp/content/WEB-INF/controller.xml Mon Dec 5 15:19:33 2011 @@ -1360,6 +1360,27 @@ under the License. <response name="error" type="view" value="EditContentRevisionItem"/> </request-map> + <!-- ================ Email Template Setting Requests ================= --> + <request-map uri="EditEmailTemplateSetting"><security auth="true" https="true"/><response name="success" type="view" value="EditEmailTemplateSetting"/></request-map> + <request-map uri="CreateEmailTemplateSetting"> + <security auth="true" https="true"/> + <event invoke="createEmailTemplateSetting" type="service"/> + <response name="success" type="view" value="EditEmailTemplateSetting"/> + <response name="error" type="view" value="EditEmailTemplateSetting"/> + </request-map> + <request-map uri="UpdateEmailTemplateSetting"> + <security auth="true" https="true"/> + <event invoke="updateEmailTemplateSetting" type="service"/> + <response name="success" type="view" value="EditEmailTemplateSetting"/> + <response name="error" type="view" value="EditEmailTemplateSetting"/> + </request-map> + <request-map uri="RemoveEmailTemplateSetting"> + <security auth="true" https="true"/> + <event invoke="removeEmailTemplateSetting" type="service"/> + <response name="success" type="view" value="EditEmailTemplateSetting"/> + <response name="error" type="view" value="EditEmailTemplateSetting"/> + </request-map> + <!-- ================ Survey Requests ================= --> <request-map uri="FindSurvey"><security auth="true" https="true"/><response name="success" type="view" value="FindSurvey"/></request-map> <request-map uri="ListFindSurveySearchResults"> @@ -2006,7 +2027,8 @@ under the License. <view-map name="EditContentTypeAttr" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentTypeAttr" type="screen"/> <view-map name="EditContentAssocPredicate" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentAssocPredicate" type="screen"/> <view-map name="EditContentOperation" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentOperation" type="screen"/> - <view-map name="EditContentPurposeOperation" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentPurposeOperation" type="screen"/> + <view-map name="EditContentPurposeOperation" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditContentPurposeOperation" type="screen"/> + <view-map name="EditEmailTemplateSetting" page="component://content/widget/contentsetup/ContentSetupScreens.xml#EditEmailTemplateSetting" type="screen"/> <view-map name="EditContentWorkEfforts" page="component://content/widget/content/ContentScreens.xml#EditContentWorkEfforts" type="screen"/> <view-map name="EditContentKeywords" type="screen" page="component://content/widget/content/ContentScreens.xml#EditContentKeywords"/> Modified: ofbiz/branches/20111205EmailHandling/applications/content/widget/EmailScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/widget/EmailScreens.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/widget/EmailScreens.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/widget/EmailScreens.xml Mon Dec 5 15:19:33 2011 @@ -19,6 +19,8 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + + <!-- Simple service notification screen --> <screen name="ServiceNotification"> <section> Modified: ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupForms.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupForms.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupForms.xml Mon Dec 5 15:19:33 2011 @@ -230,4 +230,289 @@ under the License. </hyperlink> </field> </form> + + <!-- Email Template Setting Forms --> + <form name="CreateEmailTemplateSetting" target="CreateEmailTemplateSetting" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createEmailTemplateSetting"/> + <field name="emailTemplateSettingId"><ignored/></field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit/></field> + </form> + + <form name="UpdateEmailTemplateSettings" target="UpdateEmailTemplateSetting" type="list" separate-columns="true" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <set field="sortField" from-field="parameters.sortField" default-value="emailTemplateSettingId"/> + <entity-condition entity-name="EmailTemplateSetting" use-cache="false"> + <order-by field-name="${sortField}"/> + </entity-condition> + </actions> + <auto-fields-service service-name="updateEmailTemplateSetting"/> + <field name="emailTemplateSettingId"><display/></field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="RemoveEmailTemplateSetting"> + <parameter param-name="emailTemplateSettingId"/> + </hyperlink> + </field> + </form> + + <!-- Email Template Setting Forms --> + <form name="CreateEmailTemplateSetting" target="CreateEmailTemplateSetting" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createEmailTemplateSetting"/> + <field name="emailTemplateSettingId"><ignored/></field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit/></field> + </form> + + <form name="UpdateEmailTemplateSettings" target="UpdateEmailTemplateSetting" type="list" separate-columns="true" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <set field="sortField" from-field="parameters.sortField" default-value="emailTemplateSettingId"/> + <entity-condition entity-name="EmailTemplateSetting" use-cache="false"> + <order-by field-name="${sortField}"/> + </entity-condition> + </actions> + <auto-fields-service service-name="updateEmailTemplateSetting"/> + <field name="emailTemplateSettingId"><display/></field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit/></field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="RemoveEmailTemplateSetting"> + <parameter param-name="emailTemplateSettingId"/> + </hyperlink> + </field> + </form> +</forms> +<?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. +--> + +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + <!-- ContentType forms --> + <form name="AddContentType" target="addContentType" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentType"/> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentType" list-name="contentList" target="updateContentType" title="" type="list" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="ContentType" use-cache="false"/> + </actions> + <auto-fields-service service-name="updateContentType"/> + <field name="contentTypeId" widget-style="tabletext"> + <display/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentType"> + <parameter param-name="contentTypeId"/> + </hyperlink> + </field> + </form> + + <!-- ContentTypeAttr forms --> + <form name="AddContentTypeAttr" target="addContentTypeAttr" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentTypeAttr"/> + <field entity-name="ContentType" name="contentTypeId"> + <drop-down allow-empty="false"> + <entity-options description="${description}" + entity-name="ContentType" key-field-name="contentTypeId"/> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentTypeAttr" list-name="contentList" target="updateContentTypeAttr" title="" type="list" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="ContentTypeAttr" use-cache="false"/> + </actions> + <auto-fields-service service-name="createContentTypeAttr"/> + <field name="contentTypeId"> + <display/> + </field> + <field name="attrName"> + <display/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentTypeAttr"> + <parameter param-name="contentTypeId"/> + <parameter param-name="attrName"/> + </hyperlink> + </field> + </form> + + <!-- ContentAssocType forms --> + <form name="AddContentAssocType" target="addContentAssocType" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentAssocType"/> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentAssocType" list-name="contentList" target="updateContentAssocType" title="" type="list" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="ContentAssocType" use-cache="false"/> + </actions> + <auto-fields-service service-name="updateContentAssocType"/> + <field name="contentAssocTypeId" widget-style="tabletext"> + <display/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentAssocType"> + <parameter param-name="contentAssocTypeId"/> + </hyperlink> + </field> + </form> + + <!-- ContentPurposeType forms --> + <form name="AddContentPurposeType" target="addContentPurposeType" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentPurposeType"/> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentPurposeType" list-name="contentList" target="updateContentPurposeType" title="" type="list" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="ContentPurposeType" use-cache="false"/> + </actions> + <auto-fields-service service-name="updateContentPurposeType"/> + <field name="contentPurposeTypeId" widget-style="tabletext"> + <display/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentPurposeType"> + <parameter param-name="contentPurposeTypeId"/> + </hyperlink> + </field> + </form> + + <!-- ContentAssocPredicate forms --> + <form name="AddContentAssocPredicate" target="addContentAssocPredicate" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentAssocPredicate"/> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentAssocPredicate" list-name="contentList" target="updateContentAssocPredicate" title="" type="list" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="ContentAssocPredicate" use-cache="false"/> + </actions> + <auto-fields-service service-name="updateContentAssocPredicate"/> + <field name="contentAssocPredicateId" widget-style="tabletext"> + <display/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentAssocPredicate"> + <parameter param-name="contentAssocPredicateId"/> + </hyperlink> + </field> + </form> + + <!-- ContentOperation forms --> + <form name="AddContentOperation" target="addContentOperation" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentOperation"/> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentOperation" list-name="contentList" target="updateContentOperation" title="" type="list" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-condition entity-name="ContentOperation" use-cache="false"/> + </actions> + <auto-fields-service service-name="updateContentOperation"/> + <field name="contentOperationId" widget-style="tabletext"> + <display/> + </field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentOperation"> + <parameter param-name="contentOperationId"/> + </hyperlink> + </field> + </form> + <!-- ContentPurposeOperation forms --> + <form name="AddContentPurposeOperation" target="addContentPurposeOperation" title="" type="single" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createContentPurposeOperation"/> + <field name="contentPurposeTypeId"> + <drop-down allow-empty="true"> + <entity-options description="${description}" + entity-name="ContentPurposeType" key-field-name="contentPurposeTypeId"/> + </drop-down> + </field> + <field name="contentOperationId"> + <drop-down allow-empty="true"> + <entity-options description="${description}" + entity-name="ContentOperation" key-field-name="contentOperationId"/> + </drop-down> + </field> + <field name="roleTypeId"> + <drop-down allow-empty="true"> + <entity-options description="${description}" + entity-name="RoleType" key-field-name="roleTypeId"/> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"> + <submit button-type="button"/> + </field> + </form> + <form name="UpdateContentPurposeOperation" target="" title="" type="list" list-name="contentList" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-one entity-name="ContentPurposeOperation" use-cache="false"/> + </actions> + <auto-fields-service service-name="updateContentPurposeOperation" default-field-type="display"/> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="removeContentPurposeOperation"> + <parameter param-name="contentPurposeTypeId"/> + <parameter param-name="contentOperationId"/> + <parameter param-name="roleTypeId"/> + <parameter param-name="statusId"/> + <parameter param-name="privilegeEnumId"/> + </hyperlink> + </field> + </form> </forms> Modified: ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupMenus.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupMenus.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupMenus.xml Mon Dec 5 15:19:33 2011 @@ -52,6 +52,10 @@ under the License. <link target="EditContentType" target-window="_top" style="tabButton"/> </menu-item> + <menu-item name="email" title="${uiLabelMap.PageTitleEditEmailTemplateSetup}" > + <link target="EditEmailTemplateSetting" target-window="_top" style="tabButton"/> + </menu-item> + <menu-item name="userpermissions" title="${uiLabelMap.PageTitleEditContentUserPermissions}" > <link name="UserPermissions" target="UserPermissions" target-window="_top" style="tabButton"/> </menu-item> Modified: ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupScreens.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupScreens.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/content/widget/contentsetup/ContentSetupScreens.xml Mon Dec 5 15:19:33 2011 @@ -183,4 +183,26 @@ under the License. </widgets> </section> </screen> + + <screen name="EditEmailTemplateSetting"> + <section> + <actions> + <set field="titleProperty" value="PageTitleEditEmailTemplateSetup" /> + <set field="headerItem" value="ContentSetupMenu" /> + <set field="currentMenuItemName" to-scope="user" value="email"/> + </actions> + <widgets> + <decorator-screen name="commonContentSetupDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.PageTitleEditEmailTemplateSetup}"> + <include-form name="UpdateEmailTemplateSettings" location="component://content/widget/contentsetup/ContentSetupForms.xml"/> + </screenlet> + <screenlet title="${uiLabelMap.PageTitleAddEmailTemplateSetup}"> + <include-form name="CreateEmailTemplateSetting" location="component://content/widget/contentsetup/ContentSetupForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/branches/20111205EmailHandling/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml Mon Dec 5 15:19:33 2011 @@ -545,7 +545,7 @@ under the License. </entity-one> <set field="productStoreId" from-field="webSite.productStoreId"/> </if-empty> - <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail" auto-field-map="false"> + <entity-one entity-name="OldProdStoreEmailSetting" value-field="storeEmail" auto-field-map="false"> <field-map field-name="productStoreId" from-field="productStoreId"/> <field-map field-name="emailType" value="SUB_CONT_LIST_NOTI"/> </entity-one> @@ -609,7 +609,7 @@ under the License. </entity-one> <set field="productStoreId" from-field="webSite.productStoreId"/> </if-empty> - <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail" auto-field-map="false"> + <entity-one entity-name="OldProdStoreEmailSetting" value-field="storeEmail" auto-field-map="false"> <field-map field-name="productStoreId" from-field="productStoreId"/> <field-map field-name="emailType" value="UNSUB_CONT_LIST_VERI"/> </entity-one> @@ -658,7 +658,7 @@ under the License. </entity-one> <set field="productStoreId" from-field="webSite.productStoreId"/> </if-empty> - <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail" auto-field-map="false"> + <entity-one entity-name="OldProdStoreEmailSetting" value-field="storeEmail" auto-field-map="false"> <field-map field-name="productStoreId" from-field="productStoreId"/> <field-map field-name="emailType" value="UNSUB_CONT_LIST_NOTI"/> </entity-one> Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Mon Dec 5 15:19:33 2011 @@ -250,7 +250,7 @@ public class OrderReturnServices { GenericValue productStoreEmail = null; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -301,7 +301,7 @@ public class OrderReturnServices { } return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceProduct, - "ProductProductStoreEmailSettingsNotValid", + "ProductOldProdStoreEmailSettingsNotValid", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType), locale)); } Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec 5 15:19:33 2011 @@ -2571,7 +2571,7 @@ public class OrderServices { return sendOrderNotificationScreen(ctx, context, "PRDS_ODR_PAYRETRY"); } - protected static Map<String, Object> sendOrderNotificationScreen(DispatchContext dctx, Map<String, ? extends Object> context, String emailType) { + protected static Map<String, Object> sendOrderNotificationScreen(DispatchContext dctx, Map<String, ? extends Object> context, String emailTypeEnumId) { LocalDispatcher dispatcher = dctx.getDispatcher(); Delegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -2589,7 +2589,16 @@ public class OrderServices { } // prepare the order information - Map<String, Object> sendMap = FastMap.newInstance(); + Map<String, Object> sendMap = null; + try { + sendMap = dctx.makeValidContext("sendMailFromTemplateSetting", "IN", context); + } catch (Exception e) { + Debug.logError(e, module); + return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, + "OrderServiceExceptionSeeLogs", localePar)); + } + + // get the order header and store GenericValue orderHeader = null; @@ -2604,38 +2613,28 @@ public class OrderServices { "OrderOrderNotFound", UtilMisc.toMap("orderId", orderId), localePar)); } - if (orderHeader.get("webSiteId") == null) { - return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, - "OrderOrderWithoutWebSite", UtilMisc.toMap("orderId", orderId), localePar)); - } - GenericValue productStoreEmail = null; + List<GenericValue> productStoreEmails = null; + EntityCondition mainCond = EntityCondition.makeCondition(UtilMisc.toList( + EntityExpr.makeCondition("productStoreId", orderHeader.get("productStoreId")), + EntityExpr.makeCondition("emailTypeEnumId", emailTypeEnumId), + EntityExpr.makeConditionDate("fromDate", "thruDate"))); try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", orderHeader.get("productStoreId"), "emailType", emailType)); + productStoreEmails = delegator.findList("ProdStoreEmailAndTemplateSettingView", mainCond, UtilMisc.toSet("emailTemplateSettingId", "bodyScreenLocation"), null, null, true); } catch (GenericEntityException e) { - Debug.logError(e, "Problem getting the ProductStoreEmailSetting for productStoreId=" + orderHeader.get("productStoreId") + " and emailType=" + emailType, module); + Debug.logError(e, "Problem getting EmailTemplateSettings for productStoreId = " + orderHeader.get("productStoreId") + " and emailType = " + emailTypeEnumId, module); } - if (productStoreEmail == null) { + if (UtilValidate.isEmpty(productStoreEmails)) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceProduct, - "ProductProductStoreEmailSettingsNotValid", + "ProductProdStoreEmailSettingsNotValid", UtilMisc.toMap("productStoreId", orderHeader.get("productStoreId"), - "emailType", emailType), localePar)); - } - - // the override screenUri - if (UtilValidate.isEmpty(screenUri)) { - String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); - if (UtilValidate.isEmpty(bodyScreenLocation)) { - bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailType); - } - sendMap.put("bodyScreenUri", bodyScreenLocation); - String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation"); - sendMap.put("xslfoAttachScreenLocation", xslfoAttachScreenLocation); - } else { - sendMap.put("bodyScreenUri", screenUri); + "emailType", emailTypeEnumId), localePar)); } // website + if (orderHeader.get("webSiteId") == null) { + Debug.logWarning(UtilProperties.getMessage(resource, "OrderOrderWithoutWebSite", UtilMisc.toMap("orderId", orderId), localePar), module); + } sendMap.put("webSiteId", orderHeader.get("webSiteId")); OrderReadHelper orh = new OrderReadHelper(orderHeader); @@ -2675,42 +2674,44 @@ public class OrderServices { Map<String, Object> bodyParameters = UtilMisc.<String, Object>toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "userLogin", placingUserLogin, "locale", locale); if (placingParty!= null) { bodyParameters.put("partyId", placingParty.get("partyId")); + sendMap.put("partyIdTo", placingParty.get("partyId")); } bodyParameters.put("note", note); sendMap.put("bodyParameters", bodyParameters); sendMap.put("userLogin",userLogin); - String subjectString = productStoreEmail.getString("subject"); - sendMap.put("subject", subjectString); - - sendMap.put("contentType", productStoreEmail.get("contentType")); - sendMap.put("sendFrom", productStoreEmail.get("fromAddress")); - sendMap.put("sendCc", productStoreEmail.get("ccAddress")); - sendMap.put("sendBcc", productStoreEmail.get("bccAddress")); - if ((sendTo != null) && UtilValidate.isEmail(sendTo)) { - sendMap.put("sendTo", sendTo); - } else { + if (sendTo == null || ! UtilValidate.isEmail(sendTo)) { sendMap.put("sendTo", emailString); } - if ((sendCc != null) && UtilValidate.isEmail(sendCc)) { - sendMap.put("sendCc", sendCc); - } else { - sendMap.put("sendCc", productStoreEmail.get("ccAddress")); - } - // send the notification Map<String, Object> sendResp = null; - try { - sendResp = dispatcher.runSync("sendMailFromScreen", sendMap); - } catch (Exception e) { - Debug.logError(e, module); - return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, - "OrderServiceExceptionSeeLogs",locale)); + for (GenericValue productStoreEmail : productStoreEmails) { + sendMap.put("emailTemplateSettingId", productStoreEmail.getString("emailTemplateSettingId")); + // the override screenUri + if (UtilValidate.isEmpty(screenUri)) { + String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); + if (UtilValidate.isEmpty(bodyScreenLocation)) { + bodyScreenLocation = ProductStoreWorker.getDefaultProductStoreEmailScreenLocation(emailTypeEnumId); + } + sendMap.put("bodyScreenUri", bodyScreenLocation); + } else { + sendMap.put("bodyScreenUri", screenUri); + } + + // send the notification + try { + sendResp = dispatcher.runSync("sendMailFromTemplateSetting", sendMap); + } catch (Exception e) { + Debug.logError(e, module); + return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, + "OrderServiceExceptionSeeLogs", localePar)); + } + if (ServiceUtil.isError(sendResp)) break; } // check for errors if (sendResp != null && !ServiceUtil.isError(sendResp)) { - sendResp.put("emailType", emailType); + sendResp.put("emailType", emailTypeEnumId); } if (UtilValidate.isNotEmpty(orderId)) { sendResp.put("orderId", orderId); Modified: ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/quote/QuoteServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/quote/QuoteServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/quote/QuoteServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/order/src/org/ofbiz/order/quote/QuoteServices.java Mon Dec 5 15:19:33 2011 @@ -77,20 +77,20 @@ public class QuoteServices { GenericValue productStoreEmail = null; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", quote.get("productStoreId"), "emailType", emailType)); + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", quote.get("productStoreId"), "emailType", emailType)); } catch (GenericEntityException e) { - Debug.logError(e, "Problem getting the ProductStoreEmailSetting for productStoreId=" + quote.get("productStoreId") + " and emailType=" + emailType, module); + Debug.logError(e, "Problem getting the OldProdStoreEmailSetting for productStoreId=" + quote.get("productStoreId") + " and emailType=" + emailType, module); } if (productStoreEmail == null) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceProduct, - "ProductProductStoreEmailSettingsNotValid", + "ProductOldProdStoreEmailSettingsNotValid", UtilMisc.toMap("productStoreId", quote.get("productStoreId"), "emailType", emailType), locale)); } String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation"); if (UtilValidate.isEmpty(bodyScreenLocation)) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceProduct, - "ProductProductStoreEmailSettingsNotValidBodyScreenLocation", + "ProductOldProdStoreEmailSettingsNotValidBodyScreenLocation", UtilMisc.toMap("productStoreId", quote.get("productStoreId"), "emailType", emailType), locale)); } @@ -100,7 +100,7 @@ public class QuoteServices { if ((sendTo == null) || !UtilValidate.isEmail(sendTo)) { return ServiceUtil.returnError(UtilProperties.getMessage(resourceProduct, - "ProductProductStoreEmailSettingsNoSendToFound", locale)); + "ProductOldProdStoreEmailSettingsNoSendToFound", locale)); } Map<String, Object> bodyParameters = UtilMisc.<String, Object>toMap("quoteId", quoteId, "userLogin", userLogin, "locale", locale); Modified: ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy (original) +++ ofbiz/branches/20111205EmailHandling/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy Mon Dec 5 15:19:33 2011 @@ -34,10 +34,10 @@ context.sendTo = sendTo; donePage = request.getParameter("DONE_PAGE") ?: "orderview"; context.donePage = donePage; -// Provide the correct order confirmation ProductStoreEmailSetting, if one exists +// Provide the correct order confirmation OldProdStoreEmailSetting, if one exists orderHeader = delegator.findByPrimaryKey("OrderHeader", [orderId : orderId]); if (orderHeader.productStoreId) { - productStoreEmailSetting = delegator.findByPrimaryKeyCache("ProductStoreEmailSetting", [productStoreId : orderHeader.productStoreId, emailType : emailType]); + productStoreEmailSetting = delegator.findByPrimaryKeyCache("OldProdStoreEmailSetting", [productStoreId : orderHeader.productStoreId, emailType : emailType]); if (productStoreEmailSetting) { context.productStoreEmailSetting = productStoreEmailSetting; } Modified: ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Mon Dec 5 15:19:33 2011 @@ -662,7 +662,7 @@ under the License. <result-to-field result-name="emailAddress"/> </call-service> - <entity-one entity-name="ProductStoreEmailSetting" value-field="productStoreEmailSetting"/> + <entity-one entity-name="OldProdStoreEmailSetting" value-field="productStoreEmailSetting"/> <set field="bodyParameters.partyId" from-field="parameters.partyIdTo"/> <set field="bodyParameters.email" from-field="parameters.emailAddress"/> <set field="bodyParameters.firstName" from-field="parameters.firstName"/> Modified: ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml Mon Dec 5 15:19:33 2011 @@ -271,7 +271,7 @@ under the License. </simple-method> <simple-method method-name="sendVerifyEmailAddressNotification" short-description="Send an email to the person for Verification of his Email Address" login-required="false"> - <entity-condition entity-name="ProductStoreEmailSetting" list="productStoreEmailSettings"> + <entity-condition entity-name="OldProdStoreEmailSetting" list="productStoreEmailSettings"> <condition-list> <condition-expr field-name="emailType" operator="equals" value="PRDS_EMAIL_VERIFY"/> </condition-list> Modified: ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/party/PartyServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/party/script/org/ofbiz/party/party/PartyServices.xml Mon Dec 5 15:19:33 2011 @@ -959,7 +959,7 @@ under the License. <if-empty field="productStoreId"> <log level="warning" message="No productStoreId specified."/> </if-empty> - <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail"> + <entity-one entity-name="OldProdStoreEmailSetting" value-field="storeEmail"> <field-map field-name="emailType"/> <field-map field-name="productStoreId"/> </entity-one> @@ -992,7 +992,7 @@ under the License. <if-empty field="productStoreId"> <log level="warning" message="No productStoreId specified."/> </if-empty> - <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail"> + <entity-one entity-name="OldProdStoreEmailSetting" value-field="storeEmail"> <field-map field-name="emailType" value="UPD_PRSNL_INF_CNFRM"/> <field-map field-name="productStoreId"/> </entity-one> Modified: ofbiz/branches/20111205EmailHandling/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Mon Dec 5 15:19:33 2011 @@ -398,7 +398,7 @@ public class CommunicationEventServices if (UtilValidate.isNotEmpty(webSite)) { GenericValue productStore = webSite.getRelatedOne("ProductStore"); if (UtilValidate.isNotEmpty(productStore)) { - List<GenericValue> productStoreEmailSettings = productStore.getRelatedByAnd("ProductStoreEmailSetting", UtilMisc.toMap("emailType", "CONT_EMAIL_TEMPLATE")); + List<GenericValue> productStoreEmailSettings = productStore.getRelatedByAnd("OldProdStoreEmailSetting", UtilMisc.toMap("emailType", "CONT_EMAIL_TEMPLATE")); GenericValue productStoreEmailSetting = EntityUtil.getFirst(productStoreEmailSettings); if (UtilValidate.isNotEmpty(productStoreEmailSetting)) { // send e-mail using screen template Modified: ofbiz/branches/20111205EmailHandling/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/config/ProductUiLabels.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/config/ProductUiLabels.xml Mon Dec 5 15:19:33 2011 @@ -9842,6 +9842,7 @@ <value xml:lang="zh">æ¿è¯ºææ/ç°è´§æ°éæåºå#</value> <value xml:lang="zh_TW">æ¿è«¾ææ/ç¾è²¨æ¸éæåºå#</value> </property> + <!-- deprecated pass to FormFieldTitle_bodyScreenLocation on CommonUilabels.xml <property key="ProductAttachmentScreenLocation"> <value xml:lang="de">Anhang Screen Pfad (XSL-FO)</value> <value xml:lang="en">Attachment Screen Location (XSL-FO)</value> @@ -9854,6 +9855,7 @@ <value xml:lang="zh">é件å±å¹ä½ç½® (XSL-FO)</value> <value xml:lang="zh_TW">é件è¢å¹ä½ç½® (XSL-FO)</value> </property> + --> <property key="ProductAttributes"> <value xml:lang="de">Attribute</value> <value xml:lang="en">Attributes</value> @@ -10087,6 +10089,7 @@ <value xml:lang="zh">ç®±å·</value> <value xml:lang="zh_TW">ç®±è</value> </property> + <!-- deprecated pass to FormFieldTitle_bodyScreenLocation on CommonUilabels.xml <property key="ProductBodyScreenLocation"> <value xml:lang="de">Body Screen Pfad</value> <value xml:lang="en">Body Screen Location</value> @@ -10099,6 +10102,7 @@ <value xml:lang="zh">主ä½å±å¹ä½ç½®</value> <value xml:lang="zh_TW">主é«è¢å¹ä½ç½®</value> </property> + --> <property key="ProductBox"> <value xml:lang="de">Kiste</value> <value xml:lang="en">Box</value> @@ -12080,6 +12084,10 @@ <value xml:lang="zh">å é¤å ¨é¨å ³é®å</value> <value xml:lang="zh_TW">åªé¤å ¨é¨ééµå</value> </property> + <property key="ProductDeprecatedProductStoreEmailScreen"> + <value xml:lang="en">Deprecated Screen, use it only for old email send process that not be migrate on template email system !</value> + <value xml:lang="fr">Ãcran déprécié, utilisez cet écran que pour les processus d'envoie de mél qui n'aurait pas migrés vers le nouveau système de modèle de mél !</value> + </property> <property key="ProductDepth"> <value xml:lang="de">Tiefe</value> <value xml:lang="en">Depth</value> @@ -17785,6 +17793,10 @@ <value xml:lang="zh">å¶é åç»çæ è¯ </value> <value xml:lang="zh_TW">製é å給çID </value> </property> + <property key="ProductOldProductStoreEmails"> + <value xml:lang="en">(Old) Emails</value> + <value xml:lang="fr">(Déprécié)Adr. Courriel</value> + </property> <property key="ProductOneInventoryFacility"> <value xml:lang="de">Eine Lagereinrichtung</value> <value xml:lang="en">One Inventory Facility</value> @@ -19632,7 +19644,7 @@ <value xml:lang="zh">产ååºéº</value> <value xml:lang="zh_TW">ç¢åååº</value> </property> - <property key="ProductProductStoreEmailSettings"> + <property key="ProductOldProdStoreEmailSettings"> <value xml:lang="de">Laden E-Mail Einstellungen</value> <value xml:lang="en">Product Store Email Settings</value> <value xml:lang="es">Configuración de Email de la tienda</value> @@ -19644,15 +19656,15 @@ <value xml:lang="zh">产ååºéºçµåé®ä»¶è®¾ç½®</value> <value xml:lang="zh_TW">ç¢åååºé»åéµä»¶è¨ç½®</value> </property> - <property key="ProductProductStoreEmailSettingsNotValid"> + <property key="ProductOldProdStoreEmailSettingsNotValid"> <value xml:lang="en">No valid email setting for store with productStoreId ${productStoreId} and emailType ${emailType}</value> <value xml:lang="it">Nessuna configurazione email valida per il negozio ${productStoreId} e tipo email ${emailType}</value> </property> - <property key="ProductProductStoreEmailSettingsNotValidBodyScreenLocation"> + <property key="ProductOldProdStoreEmailSettingsNotValidBodyScreenLocation"> <value xml:lang="en">No valid bodyScreenLocation in email setting for store with productStoreId ${productStoreId} and emailType ${emailType}</value> <value xml:lang="it">Nessun bodyScreenLocation valida nella configurazione email per il negozio ${productStoreId} e tipo email ${emailType}</value> </property> - <property key="ProductProductStoreEmailSettingsNoSendToFound"> + <property key="ProductOldProdStoreEmailSettingsNoSendToFound"> <value xml:lang="en">No sendTo email address found</value> <value xml:lang="it">Nessun indirizzo destinatario email trovato</value> </property> @@ -23271,6 +23283,10 @@ <value xml:lang="zh">åºéºå称</value> <value xml:lang="zh_TW">ååºå稱</value> </property> + <property key="ProductStoreEmailSettingMigration"> + <value xml:lang="en">Migrate from old email setting system on productStore: ${productStoreId}</value> + <value xml:lang="fr">Depuis la migration de l'ancien system de mail du centre de profit : ${productStoreId}</value> + </property> <property key="ProductStoreNameId"> <value xml:lang="de">Laden Namen [ID]</value> <value xml:lang="en">Store Name [ID]</value> Modified: ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel.xml Mon Dec 5 15:19:33 2011 @@ -3858,9 +3858,10 @@ under the License. <key-map field-name="prodCatalogId"/> </relation> </entity> - <entity entity-name="ProductStoreEmailSetting" + <entity entity-name="OldProdStoreEmailSetting" table-name="PRODUCT_STORE_EMAIL_SETTING" package-name="org.ofbiz.product.store" - title="Product Store Email Settings Entity"> + title="Old Product Store Email Settings Entity"> + <description>Deprecated entity to manage email setting on a ProductStore. Now use ProdStoreEmailSettingType and EmailTemplateSettingId entities</description> <field name="productStoreId" type="id-ne"></field> <field name="emailType" type="id-ne"></field> <field name="bodyScreenLocation" type="long-varchar"><description>if empty defaults to a screen based on the emailType</description></field> @@ -3879,6 +3880,29 @@ under the License. <key-map field-name="emailType" rel-field-name="enumId"/> </relation> </entity> + <entity entity-name="ProdStoreEmailTplSetting" + package-name="org.ofbiz.product.store" + title="Product Store Email Settings Entity"> + <field name="emailTemplateSettingId" type="id-ne"/> + <field name="productStoreId" type="id-ne"/> + <field name="emailTypeEnumId" type="id-ne"/> + <field name="description" type="description"/> + <field name="fromDate" type="date-time"/> + <field name="thruDate" type="date-time"/> + <prim-key field="emailTemplateSettingId"/> + <prim-key field="productStoreId"/> + <prim-key field="emailTypeEnumId"/> + <prim-key field="fromDate"/> + <relation type="one" fk-name="PRDSTREMTS_PRDS" rel-entity-name="ProductStore"> + <key-map field-name="productStoreId"/> + </relation> + <relation type="one" fk-name="PRDSTREMTS_ETS" rel-entity-name="EmailTemplateSetting"> + <key-map field-name="emailTemplateSettingId"/> + </relation> + <relation type="one" fk-name="PRDSTREMTS_ENUM" rel-entity-name="Enumeration"> + <key-map field-name="emailTypeEnumId" rel-field-name="enumId"/> + </relation> + </entity> <entity entity-name="ProductStoreFinActSetting" package-name="org.ofbiz.product.store" title="Allows financial account, such as gift certificate or calling cards, to be configured at store level"> @@ -3908,7 +3932,7 @@ under the License. <description>Field name on the purchase survey with the send to email address</description> </field> <field name="purchSurveyCopyMe" type="id"> - <description>Whether the BCC on ProductStoreEmailSetting should be copied for email notifications</description> + <description>Whether the BCC on OldProdStoreEmailSetting should be copied for email notifications</description> </field> <field name="allowAuthToNegative" type="indicator"></field> <field name="minBalance" type="currency-amount"></field> Modified: ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel_view.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel_view.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/entitydef/entitymodel_view.xml Mon Dec 5 15:19:33 2011 @@ -19,7 +19,7 @@ under the License. --> <entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd"> - + <view-entity entity-name="ContentApprovalProductContentAndInfo" package-name="org.ofbiz.content.content" title="ContentApproval, ProductContent, Content and DataResource View Entity"> @@ -61,7 +61,7 @@ under the License. <key-map field-name="contentId" rel-field-name="contentIdStart"/> </relation> </view-entity> - + <view-entity entity-name="ProductCategoryMemberAndPrice" package-name="org.ofbiz.product.category" title="ProductCategoryMember And ProductPrice View Entiry"> <member-entity entity-alias="PCM" entity-name="ProductCategoryMember"/> <member-entity entity-alias="PD" entity-name="Product"/> @@ -80,4 +80,15 @@ under the License. <key-map field-name="productId"/> </view-link> </view-entity> + + <view-entity entity-name="ProdStoreEmailAndTemplateSettingView" package-name="org.ofbiz.product.store" + title="ProdStoreEmailTplSetting And EmailTemplateSetting View"> + <member-entity entity-alias="PSES" entity-name="ProdStoreEmailTplSetting"/> + <member-entity entity-alias="ETS" entity-name="EmailTemplateSetting"/> + <alias-all entity-alias="PSES"/> + <alias-all entity-alias="ETS"><exclude field="description"/></alias-all> + <view-link entity-alias="PSES" rel-entity-alias="ETS"> + <key-map field-name="emailTemplateSettingId"/> + </view-link> + </view-entity> </entitymodel> Modified: ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/UpgradeServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/UpgradeServices.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/UpgradeServices.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/UpgradeServices.xml Mon Dec 5 15:19:33 2011 @@ -56,4 +56,28 @@ under the License. </iterate> </simple-method> + <simple-method method-name="migrateProductStoreEmailSetting" short-description="Migrate data from OldProductStoreEmailSetting to ProdStoreEmailTplSetting and EmailTemplateSetting"> + <entity-condition entity-name="ProdStoreEmailTplSetting" list="migrationAlreadyDone"/> + <if-not-empty field="migrationAlreadyDone"> + <add-error><fail-message message="Migrate data already done, nothing to do ! if it's not the case, flush ProdStoreEmailTplSetting entity, check your EmailTemplateSetting and restart this service"/></add-error> + <check-errors/> + </if-not-empty> + <entity-condition entity-name="OldProdStoreEmailSetting" list="oldProductStoreEmailSettings"/> + <iterate list="oldProductStoreEmailSettings" entry="oldProductStoreEmailSetting"> + <make-value value-field="emailTemplateSetting" entity-name="EmailTemplateSetting"/> + <sequenced-id sequence-name="EmailTemplateSetting" field="emailTemplateSetting.emailTemplateSettingId"/> + <set-nonpk-fields value-field="emailTemplateSetting" map="oldProductStoreEmailSetting"/> + <property-to-field resource="ProductUiLabels" property="ProductStoreEmailSettingMigration" field="emailTemplateSetting.description"/> + <string-append string=" ${oldProductStoreEmailSetting.productStoreId}" field="emailTemplateSetting.description"/> + <make-value value-field="prodStoreEmailTplSetting" entity-name="ProdStoreEmailTplSetting"/> + <set field="prodStoreEmailTplSetting.emailTemplateSettingId" from-field="emailTemplateSetting.emailTemplateSettingId"/> + <set field="prodStoreEmailTplSetting.productStoreId" from-field="oldProductStoreEmailSetting.productStoreId"/> + <set field="prodStoreEmailTplSetting.emailTypeEnumId" from-field="oldProductStoreEmailSetting.emailType"/> + <set field="prodStoreEmailTplSetting.fromDate" value="2001-01-01 00:00:00.000" type="Timestamp"/> + <field-to-list list="toStore" field="emailTemplateSetting"/> + <field-to-list list="toStore" field="prodStoreEmailTplSetting"/> + </iterate> + <store-list list="toStore"/> + </simple-method> + </simple-methods> Modified: ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml Mon Dec 5 15:19:33 2011 @@ -188,14 +188,15 @@ under the License. <remove-value value-field="setting"/> </simple-method> - <!-- ProductStore Email Services --> + <!-- ProductStore Email Services--> + <!-- deprecated use entity-auto <simple-method method-name="createProductStoreEmail" short-description="Create Product Store Email Setting"> <check-permission permission="CATALOG" action="_CREATE"> <fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/> </check-permission> <check-errors/> - <make-value value-field="newEntity" entity-name="ProductStoreEmailSetting"/> + <make-value value-field="newEntity" entity-name="OldProdStoreEmailSetting"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> <set-pk-fields map="parameters" value-field="newEntity"/> @@ -207,22 +208,24 @@ under the License. </check-permission> <check-errors/> - <make-value value-field="lookupKeyValue" entity-name="ProductStoreEmailSetting"/> + <make-value value-field="lookupKeyValue" entity-name="OldProdStoreEmailSetting"/> <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key entity-name="ProductStoreEmailSetting" map="lookupKeyValue" value-field="lookedUpValue"/> + <find-by-primary-key entity-name="OldProdStoreEmailSetting" map="lookupKeyValue" value-field="lookedUpValue"/> <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> <store-value value-field="lookedUpValue"/> </simple-method> + --> <simple-method method-name="removeProductStoreEmail" short-description="Remove Product Store Email Setting"> <check-permission permission="CATALOG" action="_DELETE"> <fail-property resource="ProductUiLabels" property="ProductCatalogDeletePermissionError"/> </check-permission> <check-errors/> - <make-value value-field="lookupPKMap" entity-name="ProductStoreEmailSetting"/> + <make-value value-field="lookupPKMap" entity-name="OldProdStoreEmailSetting"/> <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key entity-name="ProductStoreEmailSetting" map="lookupPKMap" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> + <find-by-primary-key entity-name="OldProdStoreEmailSetting" map="lookupPKMap" value-field="lookedUpValue"/> + <now-timestamp field="lookedUpValue.thruDate"/> + <store-value value-field="lookedUpValue"/> </simple-method> <!-- ProductStore Vendor Payment Services --> Modified: ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_store.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_store.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_store.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_store.xml Mon Dec 5 15:19:33 2011 @@ -149,28 +149,43 @@ under the License. </service> <!-- Product Store Email Services --> - <service name="createProductStoreEmailSetting" engine="simple" - location="component://product/script/org/ofbiz/product/store/ProductStoreServices.xml" invoke="createProductStoreEmail" auth="true"> + <service name="createProdStoreEmailTplSetting" engine="entity-auto" invoke="create" + auth="true" default-entity-name="ProdStoreEmailTplSetting"> + <description>Create a Product Store Email Template Setting</description> + <required-permissions join-type="AND"><check-permission permission="CATALOG" action="_CREATE"/></required-permissions> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="updateProdStoreEmailTplSetting" engine="entity-auto" invoke="update" + auth="true" default-entity-name="ProdStoreEmailTplSetting"> + <description>Update a Product Store Email Template Setting</description> + <required-permissions join-type="AND"><check-permission permission="CATALOG" action="_UPDATE"/></required-permissions> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeProdStoreEmailTplSetting" engine="entity-auto" invoke="delete" + auth="true" default-entity-name="ProdStoreEmailTplSetting"> + <description>Remove a Product Store Email Template Setting</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> + <service name="createOldProdStoreEmailSetting" engine="entity-auto" invoke="create" + auth="true" default-entity-name="OldProdStoreEmailSetting"> <description>Create a Product Store Email Setting</description> - <auto-attributes entity-name="ProductStoreEmailSetting" include="all" mode="IN" optional="false"/> - <override name="xslfoAttachScreenLocation" optional="true"/> - <override name="ccAddress" optional="true"/> - <override name="bccAddress" optional="true"/> - <override name="contentType" optional="true"/> + <required-permissions join-type="AND"><check-permission permission="CATALOG" action="_CREATE"/></required-permissions> + <auto-attributes entity-name="OldProdStoreEmailSetting" include="pk" mode="IN" optional="false"/> + <auto-attributes entity-name="OldProdStoreEmailSetting" include="nonpk" mode="IN" optional="true"/> </service> - <service name="updateProductStoreEmailSetting" engine="simple" - location="component://product/script/org/ofbiz/product/store/ProductStoreServices.xml" invoke="updateProductStoreEmail" auth="true"> + <service name="updateOldProdStoreEmailSetting" engine="entity-auto" invoke="update" + auth="true" default-entity-name="OldProdStoreEmailSetting"> <description>Update a Product Store Email Setting</description> - <auto-attributes entity-name="ProductStoreEmailSetting" include="all" mode="IN" optional="false"/> - <override name="xslfoAttachScreenLocation" optional="true"/> - <override name="ccAddress" optional="true"/> - <override name="bccAddress" optional="true"/> - <override name="contentType" optional="true"/> + <required-permissions join-type="AND"><check-permission permission="CATALOG" action="_UPDATE"/></required-permissions> + <auto-attributes entity-name="OldProdStoreEmailSetting" include="pk" mode="IN" optional="false"/> + <auto-attributes entity-name="OldProdStoreEmailSetting" include="nonpk" mode="IN" optional="true"/> </service> - <service name="removeProductStoreEmailSetting" engine="simple" + <service name="removeOldProdStoreEmailSetting" engine="simple" location="component://product/script/org/ofbiz/product/store/ProductStoreServices.xml" invoke="removeProductStoreEmail" auth="true"> <description>Remove a Product Store Email Setting</description> - <auto-attributes entity-name="ProductStoreEmailSetting" include="pk" mode="IN" optional="false"/> + <auto-attributes entity-name="OldProdStoreEmailSetting" include="pk" mode="IN" optional="false"/> </service> <!-- Product Store Shipping Method Services --> Modified: ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_upgrade.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_upgrade.xml?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_upgrade.xml (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/servicedef/services_upgrade.xml Mon Dec 5 15:19:33 2011 @@ -41,5 +41,12 @@ under the License. The field Facility.squareFootageSince has been deprecated since revision 929912 (2010-04-01) </description> </service> + <service name="migrateProductStoreEmailSetting" engine="simple" + location="component://product/script/org/ofbiz/product/UpgradeServices.xml" invoke="migrateProductStoreEmailSetting"> + <description> + Migrate data from OldProductStoreEmailSetting to ProdStoreEmailTplSetting and EmailTemplateSetting + The entity ProductStoreEmailSetting has been deprecated since revision XXX (2011-XX-XX) (FIXME) + </description> + </service> </services> Modified: ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/product/product/ProductEvents.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/product/product/ProductEvents.java Mon Dec 5 15:19:33 2011 @@ -998,7 +998,7 @@ public class ProductEvents { GenericValue productStoreEmail = null; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", emailType)); } catch (GenericEntityException e) { String errMsg = "Unable to get product store email setting for tell-a-friend: " + e.toString(); Modified: ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1210493&r1=1210492&r2=1210493&view=diff ============================================================================== --- ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original) +++ ofbiz/branches/20111205EmailHandling/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Mon Dec 5 15:19:33 2011 @@ -1148,13 +1148,13 @@ public class ShipmentServices { } GenericValue productStoreEmail = null; try { - productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", orderHeader.get("productStoreId"), "emailType", "PRDS_ODR_SHIP_COMPLT")); + productStoreEmail = delegator.findByPrimaryKey("OldProdStoreEmailSetting", UtilMisc.toMap("productStoreId", orderHeader.get("productStoreId"), "emailType", "PRDS_ODR_SHIP_COMPLT")); } catch (GenericEntityException e) { - Debug.logError(e, "Problem getting the ProductStoreEmailSetting for productStoreId =" + orderHeader.get("productStoreId") + " and emailType = PRDS_ODR_SHIP_COMPLT", module); + Debug.logError(e, "Problem getting the OldProdStoreEmailSetting for productStoreId =" + orderHeader.get("productStoreId") + " and emailType = PRDS_ODR_SHIP_COMPLT", module); } if (productStoreEmail == null) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, - "ProductProductStoreEmailSettingsNotValid", + "ProductOldProdStoreEmailSettingsNotValid", UtilMisc.toMap("productStoreId", orderHeader.get("productStoreId"), "emailType", "PRDS_ODR_SHIP_COMPLT"), localePar)); } @@ -1176,7 +1176,7 @@ public class ShipmentServices { } if (UtilValidate.isEmpty(emailString)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, - "ProductProductStoreEmailSettingsNoSendToFound", localePar)); + "ProductOldProdStoreEmailSettingsNoSendToFound", localePar)); } Locale locale = PartyWorker.findPartyLastLocale(partyId, delegator); |
Free forum by Nabble | Edit this page |