You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/06/16 15:07:13 UTC

svn commit: r785194 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/contact/ applications/party/script/org/ofbiz/party/party/ applications/party/servicedef/ specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/ specialpurpose/ecomm...

Author: ashish
Date: Tue Jun 16 13:07:13 2009
New Revision: 785194

URL: http://svn.apache.org/viewvc?rev=785194&view=rev
Log:
Applied patch from jira issue OFBIZ-2556 (createUpdateEmailAddress service should be renamed to createUpdatePartyEmailAddress remove the effort of updating contactMech infoString)

Thanks Jyotsna for the contribution.

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
    ofbiz/trunk/applications/party/servicedef/services.xml
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=785194&r1=785193&r2=785194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml Tue Jun 16 13:07:13 2009
@@ -540,4 +540,25 @@
             </call-service>
         </if-not-empty>
     </simple-method>
+    
+    <simple-method method-name="createUpdatePartyEmailAddress" short-description="Create and update email address" login-required="false">
+        <if-empty field="parameters.contactMechId">
+            <set-service-fields service-name="createPartyEmailAddress" map="parameters" to-map="emailAddressContext"/>
+            <set field="emailAddressContext.partyId" from-field="userLogin.partyId"/>
+            <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressContext">
+                <result-to-field result-name="contactMechId" field="contactMechId"/>
+            </call-service>
+            <log level="info" message="Email Contact Created emailContactMechId is ${contactMechId}"></log>
+        <else>
+            <set-service-fields service-name="updatePartyEmailAddress" map="parameters" to-map="emailAddressContext"/>
+            <call-service service-name="updatePartyEmailAddress" in-map-name="emailAddressContext">
+                <result-to-field result-name="contactMechId" field="contactMechId"/>
+            </call-service>
+            <log level="info" message="Email Contact updated emailContactMechId is ${contactMechId}"></log>
+        </else>
+        </if-empty>
+        <entity-one entity-name="ContactMech" value-field="contactMech"/>
+        <field-to-result field="contactMech.infoString" result-name="emailAddress"/>
+        <field-to-result field="contactMechId"/>
+    </simple-method>
 </simple-methods>
\ No newline at end of file

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=785194&r1=785193&r2=785194&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 Tue Jun 16 13:07:13 2009
@@ -977,25 +977,4 @@
         </if-empty>
         <field-to-result field="contactMechId"/>
     </simple-method>
-
-    <simple-method method-name="createUpdateEmailAddress" short-description="Create and update email address" login-required="false">
-        <if-empty field="parameters.contactMechId">
-            <set-service-fields service-name="createPartyEmailAddress" map="parameters" to-map="emailAddressContext"/>
-            <set field="emailAddressContext.partyId" from-field="userLogin.partyId"/>
-            <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressContext">
-                <result-to-field result-name="contactMechId" field="contactMechId"/>
-            </call-service>
-            <log level="info" message="Email Contact Created emailContactMechId is ${contactMechId}"></log>
-        <else>
-            <set-service-fields service-name="updatePartyEmailAddress" map="parameters" to-map="emailAddressContext"/>
-            <call-service service-name="updatePartyEmailAddress" in-map-name="emailAddressContext">
-                <result-to-field result-name="contactMechId" field="contactMechId"/>
-            </call-service>
-            <log level="info" message="Email Contact updated emailContactMechId is ${contactMechId}"></log>
-        </else>
-        </if-empty>
-        <entity-one entity-name="ContactMech" value-field="contactMech"/>
-        <field-to-result field="contactMech.infoString" result-name="emailAddress"/>
-        <field-to-result field="contactMechId"/>
-    </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=785194&r1=785193&r2=785194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Tue Jun 16 13:07:13 2009
@@ -1179,8 +1179,8 @@
         <attribute name="roleTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="contactMechId" type="String" mode="INOUT" optional="true"/>
     </service>
-    <service name="createUpdateEmailAddress" engine="simple"
-        location="component://party/script/org/ofbiz/party/party/PartyServices.xml" invoke="createUpdateEmailAddress" auth="false">
+    <service name="createUpdatePartyEmailAddress" engine="simple"
+        location="component://party/script/org/ofbiz/party/contact/PartyContactMechServices.xml" invoke="createUpdatePartyEmailAddress" auth="false">
         <description>Create and Update email address</description>
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
         <attribute name="userLogin" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>

Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=785194&r1=785193&r2=785194&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Tue Jun 16 13:07:13 2009
@@ -919,11 +919,11 @@
                 processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/>
         <check-errors/>
 
-        <set-service-fields service-name="createUpdateEmailAddress" map="emailAddressContext" to-map="createUpdateEmailCtx"/>
-        <set field="createUpdateEmailCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
-        <set field="createUpdateEmailCtx.userLogin" from-field="userLogin"/>
-        <set field="createUpdateEmailCtx.partyId" from-field="parameters.partyId"/>
-        <call-service service-name="createUpdateEmailAddress" in-map-name="createUpdateEmailCtx">
+        <set-service-fields service-name="createUpdatePartyEmailAddress" map="emailAddressContext" to-map="createUpdatePartyEmailCtx"/>
+        <set field="createUpdatePartyEmailCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
+        <set field="createUpdatePartyEmailCtx.userLogin" from-field="userLogin"/>
+        <set field="createUpdatePartyEmailCtx.partyId" from-field="parameters.partyId"/>
+        <call-service service-name="createUpdatePartyEmailAddress" in-map-name="createUpdatePartyEmailCtx">
             <result-to-field result-name="contactMechId" field="parameters.emailContactMechId"/>
         </call-service>
         <field-to-request field="parameters.emailContactMechId" request-name="emailContactMechId"/>
@@ -1354,12 +1354,12 @@
         <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml"
                 processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/>
         <check-errors/>
-        <set-service-fields service-name="createUpdateEmailAddress" map="emailAddressContext" to-map="createUpdateEmailCtx"/>
-        <set field="createUpdateEmailCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
-        <set field="createUpdateEmailCtx.contactMechId" from-field="parameters.emailContactMechId"/>
-        <set field="createUpdateEmailCtx.userLogin" from-field="userLogin"/>
-        <set field="createUpdateEmailCtx.partyId" from-field="parameters.partyId"/>
-        <call-service service-name="createUpdateEmailAddress" in-map-name="createUpdateEmailCtx">
+        <set-service-fields service-name="createUpdatePartyEmailAddress" map="emailAddressContext" to-map="createUpdatePartyEmailCtx"/>
+        <set field="createUpdatePartyEmailCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
+        <set field="createUpdatePartyEmailCtx.contactMechId" from-field="parameters.emailContactMechId"/>
+        <set field="createUpdatePartyEmailCtx.userLogin" from-field="userLogin"/>
+        <set field="createUpdatePartyEmailCtx.partyId" from-field="parameters.partyId"/>
+        <call-service service-name="createUpdatePartyEmailAddress" in-map-name="createUpdatePartyEmailCtx">
             <result-to-field result-name="contactMechId" field="parameters.emailContactMechId"/>
         </call-service>
     </simple-method>

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=785194&r1=785193&r2=785194&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Tue Jun 16 13:07:13 2009
@@ -1775,7 +1775,7 @@
 
     <request-map uri="updatePartyEmailAddress">
         <security https="true" auth="true"/>
-        <event type="jsonservice" invoke="createUpdateEmailAddress"/>
+        <event type="jsonservice" invoke="createUpdatePartyEmailAddress"/>
         <response name="success" type="none"/>
         <response name="error" type="none"/>
     </request-map>