Author: ashish
Date: Wed Sep 9 15:11:16 2009 New Revision: 812985 URL: http://svn.apache.org/viewvc?rev=812985&view=rev Log: It is good to move party specific map processor to party component. Applied patch from jira issue(OFBIZ-2913) - Write a new service for quick create customer profile. The similar service exists in SFA component so lets first explore the existing services - So I am not committing new service. Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml?rev=812985&r1=812984&r2=812985&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml Wed Sep 9 15:11:16 2009 @@ -64,4 +64,34 @@ <not-empty><fail-property resource="PartyUiLabels" property="CommonFromDateMissing"/></not-empty> <convert type="Timestamp"><fail-property resource="PartyUiLabels" property="CommonFromDateNotValidDateTime"/></convert></process> </simple-map-processor> + + <simple-map-processor name="person"> + <process field="firstName"> + <copy/> + <not-empty> + <fail-property resource="PartyUiLabels" property="PartyFirstNameMissing"/> + </not-empty> + </process> + <process field="lastName"> + <copy/> + <not-empty> + <fail-property resource="PartyUiLabels" property="PartyLastNameMissingError"/> + </not-empty> + </process> + </simple-map-processor> + + <simple-map-processor name="emailAddress"> + <process field="emailContactMechId"> + <copy to-field="contactMechId" set-if-null="false"/> + </process> + <process field="emailAddress"> + <not-empty> + <fail-property resource="PartyUiLabels" property="PartyEmailAddressMissingError"/> + </not-empty> + <validate-method method="isEmail"> + <fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/> + </validate-method> + <copy/> + </process> + </simple-map-processor> </simple-map-processors> Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml?rev=812985&r1=812984&r2=812985&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml (original) +++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml Wed Sep 9 15:11:16 2009 @@ -21,21 +21,6 @@ <simple-map-processors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> - <simple-map-processor name="person"> - <process field="firstName"> - <copy/> - <not-empty> - <fail-property resource="PartyUiLabels" property="PartyFirstNameMissing"/> - </not-empty> - </process> - <process field="lastName"> - <copy/> - <not-empty> - <fail-property resource="PartyUiLabels" property="PartyLastNameMissingError"/> - </not-empty> - </process> - </simple-map-processor> - <simple-map-processor name="phoneNumber"> <process field="phoneContactMechId"> <copy to-field="contactMechId" set-if-null="false"/> @@ -63,21 +48,6 @@ </process> </simple-map-processor> - <simple-map-processor name="emailAddress"> - <process field="emailContactMechId"> - <copy to-field="contactMechId" set-if-null="false"/> - </process> - <process field="emailAddress"> - <not-empty> - <fail-property resource="PartyUiLabels" property="PartyEmailAddressMissingError"/> - </not-empty> - <validate-method method="isEmail"> - <fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/> - </validate-method> - <copy/> - </process> - </simple-map-processor> - <simple-map-processor name="shipToAddress"> <process field="shipToContactMechId"> <copy to-field="contactMechId" set-if-null="false"/> 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=812985&r1=812984&r2=812985&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 Wed Sep 9 15:11:16 2009 @@ -922,7 +922,7 @@ </if-not-empty> <!-- Create Update email address --> - <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml" + <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml" processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/> <check-errors/> @@ -1276,9 +1276,9 @@ <simple-method method-name="createCustomerProfile" short-description="create a customer profile" login-required="false"> <!-- Process all map --> - <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml" + <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml" processor-name="person" in-map-name="parameters" out-map-name="personCtx"/> - <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml" + <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml" processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressCtx"/> <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml" processor-name="shipToAddress" in-map-name="parameters" out-map-name="shipToAddressCtx"/> @@ -1385,7 +1385,7 @@ <call-simple-method method-name="createUpdateUserLogin"/> - <call-map-processor xml-resource="component://ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml" + <call-map-processor xml-resource="component://party/script/org/ofbiz/party/contact/PartyContactMechMapProcs.xml" processor-name="emailAddress" in-map-name="parameters" out-map-name="emailAddressContext"/> <check-errors/> <set-service-fields service-name="createUpdatePartyEmailAddress" map="emailAddressContext" to-map="createUpdatePartyEmailCtx"/> |
Free forum by Nabble | Edit this page |