Author: jleroux
Date: Sat Jul 7 13:43:44 2007 New Revision: 554261 URL: http://svn.apache.org/viewvc?view=rev&rev=554261 Log: Applied fix from trunk for revision: 554260 Modified: ofbiz/branches/release4.0/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml ofbiz/branches/release4.0/applications/marketing/servicedef/secas.xml ofbiz/branches/release4.0/applications/marketing/servicedef/services.xml ofbiz/branches/release4.0/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml ofbiz/branches/release4.0/applications/party/servicedef/services.xml Modified: ofbiz/branches/release4.0/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml?view=diff&rev=554261&r1=554260&r2=554261 ============================================================================== --- ofbiz/branches/release4.0/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml (original) +++ ofbiz/branches/release4.0/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml Sat Jul 7 13:43:44 2007 @@ -142,6 +142,15 @@ <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> <store-value value-name="lookedUpValue"/> </simple-method> + <simple-method method-name="updatePartyEmailContactListParty" short-description="Update ContactList Party Contact Mech"> + <set field="lookupMap.preferredContactMechId" from-field="parameters.oldContactMechId"/> + <find-by-and entity-name="ContactListParty" map-name="lookupMap" list-name="ContactListParties"/> + <iterate entry-name="contactlistparty" list-name="ContactListParties"> + <set field="contactlistparty.preferredContactMechId" from-field="parameters.contactMechId"/> + <log level="info" message="Replacing preferredContactMechId: ${parameters.oldContactMechId} of the ContactList: ${contactlistparty.contactListId} with new preferredContactMechId: ${parameters.contactMechId}"/> + <store-value value-name="contactlistparty"/> + </iterate> + </simple-method> <simple-method method-name="deleteContactListParty" short-description="Remove Party from ContactList"> <check-permission permission="MARKETING" action="_DELETE"><fail-message message="Security Error: to run deleteContactListParty you must have the MARKETING_DELETE or MARKETING_ADMIN permission"/></check-permission> <check-errors/> Modified: ofbiz/branches/release4.0/applications/marketing/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/marketing/servicedef/secas.xml?view=diff&rev=554261&r1=554260&r2=554261 ============================================================================== --- ofbiz/branches/release4.0/applications/marketing/servicedef/secas.xml (original) +++ ofbiz/branches/release4.0/applications/marketing/servicedef/secas.xml Sat Jul 7 13:43:44 2007 @@ -24,4 +24,7 @@ <condition field-name="statusId" operator="equals" value="CLPT_PENDING"/> <action service="sendContactListPartyVerifyEmail" mode="async" persist="true"/> </eca> + <eca service="updatePartyEmailAddress" event="return"> + <action service="updatePartyEmailContactListParty" mode="sync"/> + </eca> </service-eca> Modified: ofbiz/branches/release4.0/applications/marketing/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/marketing/servicedef/services.xml?view=diff&rev=554261&r1=554260&r2=554261 ============================================================================== --- ofbiz/branches/release4.0/applications/marketing/servicedef/services.xml (original) +++ ofbiz/branches/release4.0/applications/marketing/servicedef/services.xml Sat Jul 7 13:43:44 2007 @@ -145,6 +145,12 @@ <auto-attributes include="nonpk" mode="IN" optional="true"/> <attribute name="optInVerifyCode" type="String" mode="IN" optional="true"/> </service> + <service name="updatePartyEmailContactListParty" engine="simple" + location="org/ofbiz/marketing/contact/ContactListServices.xml" invoke="updatePartyEmailContactListParty" auth="true"> + <description>Update ContactList Party Contact Mech</description> + <attribute name="contactMechId" type="String" mode="IN" optional="false"/> + <attribute name="oldContactMechId" type="String" mode="IN" optional="false"/> + </service> <service name="deleteContactListParty" default-entity-name="ContactListParty" engine="simple" location="org/ofbiz/marketing/contact/ContactListServices.xml" invoke="deleteContactListParty" auth="true"> <description>Remove Party from ContactList</description> Modified: ofbiz/branches/release4.0/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?view=diff&rev=554261&r1=554260&r2=554261 ============================================================================== --- ofbiz/branches/release4.0/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml (original) +++ ofbiz/branches/release4.0/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml Sat Jul 7 13:43:44 2007 @@ -313,6 +313,7 @@ <result-to-result result-name="contactMechId"/> <result-to-request result-name="contactMechId"/> </call-service> + <field-to-result map-name="parameters" field-name="contactMechId" result-name="oldContactMechId"/> </simple-method> <simple-method method-name="findPartyFromEmailAddress" short-description="Find partyId from email address"> Modified: ofbiz/branches/release4.0/applications/party/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/party/servicedef/services.xml?view=diff&rev=554261&r1=554260&r2=554261 ============================================================================== --- ofbiz/branches/release4.0/applications/party/servicedef/services.xml (original) +++ ofbiz/branches/release4.0/applications/party/servicedef/services.xml Sat Jul 7 13:43:44 2007 @@ -442,8 +442,9 @@ location="org/ofbiz/party/contact/PartyContactMechServices.xml" invoke="updatePartyEmailAddress" auth="true"> <description>Update an Email Address</description> <auto-attributes entity-name="PartyContactMech" include="all" mode="IN" optional="true"/> - <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/> + <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/> <!-- the out paramater is the id of the new address --> <attribute name="emailAddress" type="String" mode="IN" optional="false"/> + <attribute name="oldContactMechId" type="String" mode="OUT" optional="false"/> <!-- this is the id of the old address --> </service> <service name="copyPartyContactMechs" engine="java" location="org.ofbiz.party.contact.ContactMechServices" invoke="copyPartyContactMechs" auth="true"> |
Free forum by Nabble | Edit this page |