svn commit: r654074 - in /ofbiz/trunk/applications/party: script/org/ofbiz/party/party/PartyServices.xml script/org/ofbiz/party/user/UserEvents.xml servicedef/services.xml

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

svn commit: r654074 - in /ofbiz/trunk/applications/party: script/org/ofbiz/party/party/PartyServices.xml script/org/ofbiz/party/user/UserEvents.xml servicedef/services.xml

mor-2
Author: mor
Date: Wed May  7 04:35:51 2008
New Revision: 654074

URL: http://svn.apache.org/viewvc?rev=654074&view=rev
Log:
Changed sendCreatePartyEmailNotification service attribute name to emailAddress, moved services from events to services file which is a more logical placeholder with little cleanups

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml
    ofbiz/trunk/applications/party/servicedef/services.xml

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=654074&r1=654073&r2=654074&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Wed May  7 04:35:51 2008
@@ -816,4 +816,74 @@
         <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/>        
         <store-value value-name="lookedUpValue"/>
     </simple-method>
+    
+    <!-- send party creation email notification -->
+    <simple-method method-name="sendCreatePartyEmailNotification" short-description="Notification email on party creation" login-required="false">
+        <map-to-map map-name="parameters" to-map-name="bodyParameters"/>    
+        <entity-condition entity-name="ProductStoreEmailSetting" list-name="productStoreEmailSettings">
+            <condition-list>
+                <condition-expr field-name="emailType" operator="equals" value="PARTY_REGIS_CONFIRM"/>
+            </condition-list>
+        </entity-condition>
+        <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/>
+        <if-not-empty field-name="bodyScreenLocation" map-name="storeEmail">
+            <set field="emailParams.sendTo" from-field="parameters.emailAddress"/>
+            <set field="emailParams.subject" from-field="storeEmail.subject"/>
+            <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
+            <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
+            <set field="emailParams.sendBcc" from-field="storeEmail.bccAddress"/>
+            <set field="emailParams.contentType" from-field="storeEmail.contentType"/>
+            <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
+            <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/>
+            <map-to-map to-map-name="emailParams.bodyParameters" map-name="parameters"/>
+            <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/>
+        </if-not-empty>
+    </simple-method>  
+
+    <!-- send personal information update email notification -->
+    <simple-method method-name="sendUpdatePersonalInfoEmailNotification" short-description="Send the Notification email on personal information updation" login-required="false">
+        <map-to-map map-name="parameters" to-map-name="bodyParameters"/>
+        <entity-condition entity-name="ProductStoreEmailSetting" list-name="productStoreEmailSettings">
+            <condition-list>
+                <condition-expr field-name="emailType" operator="equals" value="UPD_PRSNL_INF_CNFRM"/>
+            </condition-list>
+        </entity-condition>
+        <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/>
+        <if-not-empty field-name="bodyScreenLocation" map-name="storeEmail">
+            <if-not-empty field-name="parameters.updatedUserLogin.partyId">
+                <set field="partyId" from-field="parameters.updatedUserLogin.partyId"/>
+            <else>
+                <set field="partyId" from-field="parameters.partyId"/>
+            </else>
+            </if-not-empty>
+            <entity-condition entity-name="PartyContactDetailByPurpose" list-name="partyContactDetailByPurposes">
+                <condition-list>
+                    <condition-expr field-name="contactMechPurposeTypeId" operator="equals" value="PRIMARY_EMAIL"/>
+                    <condition-expr field-name="partyId" operator="equals"  env-name="partyId"/>
+                </condition-list>
+            </entity-condition>
+            <filter-list-by-date list-name="partyContactDetailByPurposes" to-list-name="validPartyContactDetailByPurposes"/>
+            <first-from-list entry-name="partyContactDetailByPurpose" list-name="validPartyContactDetailByPurposes"/>
+            <entity-one entity-name="PartyAndPerson" value-name="partyAndPerson"/>
+            <set field="bodyParameters.partyAndPerson" from-field="partyAndPerson"/>
+            <set field="contactMechId" from-field="partyContactDetailByPurpose.contactMechId"/>
+            <entity-one entity-name="ContactMech" value-name="contactMech"/>
+            <set field="emailParams.sendTo" from-field="contactMech.infoString"/>
+            <set field="emailParams.subject" from-field="storeEmail.subject"/>
+            <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
+            <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
+            <set field="emailParams.sendBcc" from-field="storeEmail.bccAddress"/>
+            <set field="emailParams.contentType" from-field="storeEmail.contentType"/>
+            <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
+            <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/>
+            
+            <if-not-empty field-name="emailParams.sendTo">
+                <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/>
+                <else>
+                    <log level="warning" message="Tried to send Update Personal Info Notifcation with no to address; partyId is [${partyId}], subject is: ${emailParams.subject}"/>
+                </else>
+            </if-not-empty>
+        </if-not-empty>
+    </simple-method>
+    
 </simple-methods>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml?rev=654074&r1=654073&r2=654074&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml Wed May  7 04:35:51 2008
@@ -394,81 +394,8 @@
         <field-to-request field-name="partyId" map-name="tempMap" request-name="partyId"/>
 
         <!--send New User Email Notification-->
-        <call-simple-method method-name="sendCreatePartyEmailNotification"/>
+        <set-service-fields service-name="sendCreatePartyEmailNotification" map-name="emailContext" to-map-name="serviceInMap"/>
+        <call-service service-name="sendCreatePartyEmailNotification" in-map-name="serviceInMap"/>
     </simple-method>
 
-    <!--send party creation email notification-->
-    <simple-method method-name="sendCreatePartyEmailNotification" short-description="Notification email on party creation" login-required="false">
-        <map-to-map map-name="parameters" to-map-name="bodyParameters"/>    
-        <entity-condition entity-name="ProductStoreEmailSetting" list-name="productStoreEmailSettings">
-            <condition-list>
-                <condition-expr field-name="emailType" operator="equals" value="PARTY_REGIS_CONFIRM"/>
-            </condition-list>
-        </entity-condition>
-        <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/>
-        <if-not-empty field-name="bodyScreenLocation" map-name="storeEmail">
-            <if-not-empty field-name="parameters.USER_EMAIL">
-                <set field="sendToEmailAdd" from-field="parameters.USER_EMAIL"/>
-            <else>
-                <set field="sendToEmailAdd" from-field="parameters.emailAddress"/>
-            </else>            
-            </if-not-empty>
-            <set field="emailParams.sendTo" from-field="sendToEmailAdd"/>
-            <set field="emailParams.subject" from-field="storeEmail.subject"/>
-            <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
-            <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
-            <set field="emailParams.sendBcc" from-field="storeEmail.bccAddress"/>
-            <set field="emailParams.contentType" from-field="storeEmail.contentType"/>
-            <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
-            <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/>
-            <map-to-map to-map-name="emailParams.bodyParameters" map-name="parameters"/>
-            <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/>
-        </if-not-empty>
-    </simple-method>  
-
-    <!--send personal information update email notification-->
-    <simple-method method-name="sendUpdatePersonalInfoEmailNotification" short-description="Send the Notification email on personal information updation" login-required="false">
-        <map-to-map map-name="parameters" to-map-name="bodyParameters"/>
-        <entity-condition entity-name="ProductStoreEmailSetting" list-name="productStoreEmailSettings">
-            <condition-list>
-                <condition-expr field-name="emailType" operator="equals" value="UPD_PRSNL_INF_CNFRM"/>
-            </condition-list>
-        </entity-condition>
-        <first-from-list entry-name="storeEmail" list-name="productStoreEmailSettings"/>
-        <if-not-empty field-name="bodyScreenLocation" map-name="storeEmail">
-            <if-not-empty field-name="parameters.updatedUserLogin.partyId">
-                <set field="partyId" from-field="parameters.updatedUserLogin.partyId"/>
-            <else>
-                <set field="partyId" from-field="parameters.partyId"/>
-            </else>
-            </if-not-empty>
-            <entity-condition entity-name="PartyContactDetailByPurpose" list-name="partyContactDetailByPurposes">
-                <condition-list>
-                    <condition-expr field-name="contactMechPurposeTypeId" operator="equals" value="PRIMARY_EMAIL"/>
-                    <condition-expr field-name="partyId" operator="equals"  env-name="partyId"/>
-                </condition-list>
-            </entity-condition>
-            <filter-list-by-date list-name="partyContactDetailByPurposes" to-list-name="validPartyContactDetailByPurposes"/>
-            <first-from-list entry-name="partyContactDetailByPurpose" list-name="validPartyContactDetailByPurposes"/>
-            <entity-one entity-name="PartyAndPerson" value-name="partyAndPerson"/>
-            <set field="bodyParameters.partyAndPerson" from-field="partyAndPerson"/>
-            <set field="contactMechId" from-field="partyContactDetailByPurpose.contactMechId"/>
-            <entity-one entity-name="ContactMech" value-name="contactMech"/>
-            <set field="emailParams.sendTo" from-field="contactMech.infoString"/>
-            <set field="emailParams.subject" from-field="storeEmail.subject"/>
-            <set field="emailParams.sendFrom" from-field="storeEmail.fromAddress"/>
-            <set field="emailParams.sendCc" from-field="storeEmail.ccAddress"/>
-            <set field="emailParams.sendBcc" from-field="storeEmail.bccAddress"/>
-            <set field="emailParams.contentType" from-field="storeEmail.contentType"/>
-            <set field="emailParams.bodyParameters" from-field="bodyParameters"/>
-            <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/>
-            
-            <if-not-empty field-name="emailParams.sendTo">
-                <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/>
-                <else>
-                    <log level="warning" message="Tried to send Update Personal Info Notifcation with no to address; partyId is [${partyId}], subject is: ${emailParams.subject}"/>
-                </else>
-            </if-not-empty>
-        </if-not-empty>
-    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=654074&r1=654073&r2=654074&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Wed May  7 04:35:51 2008
@@ -827,13 +827,13 @@
     </service>
 
     <service name="sendUpdatePersonalInfoEmailNotification" engine="simple"
-            location="org/ofbiz/party/user/UserEvents.xml" invoke="sendUpdatePersonalInfoEmailNotification" auth="false">
+            location="org/ofbiz/party/party/PartyServices.xml" invoke="sendUpdatePersonalInfoEmailNotification" auth="false">
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
         <attribute name="updatedUserLogin" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>    
     </service>
     <service name="sendCreatePartyEmailNotification" engine="simple"
-            location="org/ofbiz/party/user/UserEvents.xml" invoke="sendCreatePartyEmailNotification" auth="false">
-        <attribute name="USER_EMAIL" type="String" mode="IN" optional="false"/>
+            location="org/ofbiz/party/party/PartyServices.xml" invoke="sendCreatePartyEmailNotification" auth="false">
+        <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
     </service>
     
     <!-- Email address verification services-->