svn commit: r781689 - in /ofbiz/trunk/specialpurpose/googlecheckout: data/ entitydef/ servicedef/ src/org/ofbiz/googlecheckout/ widget/

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

svn commit: r781689 - in /ofbiz/trunk/specialpurpose/googlecheckout: data/ entitydef/ servicedef/ src/org/ofbiz/googlecheckout/ widget/

ashish-18
Author: ashish
Date: Thu Jun  4 09:14:51 2009
New Revision: 781689

URL: http://svn.apache.org/viewvc?rev=781689&view=rev
Log:
Changed the name of entities as it was exceeding the maximum length i.e 30.
Reported by Hans on Dev mailing list. Thanks Hans.

There are two reason of choosing "Co" pattern for the entities.

1) I haven't seen any such pattern in OFBiz to define entity in which you have three or more capital letter coming in b/w.
Like for General Ledger, GlAccount is used OOTB.

2) In database it will split the table name to Google_C_O_Shipping_Method if we keep the name GoogleCOShippingMethod.
So it looks like you have some new word starting with "C" and another new word starting with "O"
But if we keep the name GoogleCoShippingMethod then it will split the name into "Google_Co_Shipping_Method"




Modified:
    ofbiz/trunk/specialpurpose/googlecheckout/data/DemoGoogleCheckoutData.xml
    ofbiz/trunk/specialpurpose/googlecheckout/entitydef/entitymodel.xml
    ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml
    ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java
    ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
    ofbiz/trunk/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml

Modified: ofbiz/trunk/specialpurpose/googlecheckout/data/DemoGoogleCheckoutData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/data/DemoGoogleCheckoutData.xml?rev=781689&r1=781688&r2=781689&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/data/DemoGoogleCheckoutData.xml (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/data/DemoGoogleCheckoutData.xml Thu Jun  4 09:14:51 2009
@@ -21,9 +21,9 @@
 <entity-engine-xml>
     <WebSite webSiteId="GOOGLECHECKOUT" productStoreId="9000" />
     
-    <GoogleCheckoutShippingMethod methodTypeEnumId="GOOGLE_FLAT_RATE" shipmentMethodName="Express" productStoreId="9000" amount="20.00" carrierPartyId="UPS" shipmentMethodTypeId="AIR"/>
-    <GoogleCheckoutShippingMethod methodTypeEnumId="GOOGLE_FLAT_RATE" shipmentMethodName="Standard" productStoreId="9000" amount="10.00" carrierPartyId="UPS" shipmentMethodTypeId="GROUND"/>
-    <GoogleCheckoutShippingMethod methodTypeEnumId="GOOGLE_FLAT_RATE" shipmentMethodName="Free" productStoreId="9000" amount="0.00" carrierPartyId="USPS" shipmentMethodTypeId="STANDARD"/>
+    <GoogleCoShippingMethod methodTypeEnumId="GOOGLE_FLAT_RATE" shipmentMethodName="Express" productStoreId="9000" amount="20.00" carrierPartyId="UPS" shipmentMethodTypeId="AIR"/>
+    <GoogleCoShippingMethod methodTypeEnumId="GOOGLE_FLAT_RATE" shipmentMethodName="Standard" productStoreId="9000" amount="10.00" carrierPartyId="UPS" shipmentMethodTypeId="GROUND"/>
+    <GoogleCoShippingMethod methodTypeEnumId="GOOGLE_FLAT_RATE" shipmentMethodName="Free" productStoreId="9000" amount="0.00" carrierPartyId="USPS" shipmentMethodTypeId="STANDARD"/>
     
-    <GoogleCheckoutConfiguration productStoreId="9000" merchantId="634321449957567" merchantKey="DAnyTJLnPzhhK_CuCaQOCg" envEnumId="GOOGLE_SANDBOX" webSiteId="WebStore" prodCatalogId="DemoCatalog" currencyUomId="USD" requestAuthDetails="Y" requestPhone="Y" sendPromoItems="N" errorOnBadItem="Y" acceptCoupons="N" acceptGiftCerts="N"/>      
+    <GoogleCoConfiguration productStoreId="9000" merchantId="634321449957567" merchantKey="DAnyTJLnPzhhK_CuCaQOCg" envEnumId="GOOGLE_SANDBOX" webSiteId="WebStore" prodCatalogId="DemoCatalog" currencyUomId="USD" requestAuthDetails="Y" requestPhone="Y" sendPromoItems="N" errorOnBadItem="Y" acceptCoupons="N" acceptGiftCerts="N"/>      
 </entity-engine-xml>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/googlecheckout/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/entitydef/entitymodel.xml?rev=781689&r1=781688&r2=781689&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/entitydef/entitymodel.xml Thu Jun  4 09:14:51 2009
@@ -41,7 +41,7 @@
     <!-- org.ofbiz.googlecheckout.config -->
     <!-- ========================================================= -->
   
-    <entity entity-name="GoogleCheckoutConfiguration"
+    <entity entity-name="GoogleCoConfiguration"
             package-name="org.ofbiz.googlecheckout.config"
             title="Google Checkout Configuration">
         <field name="productStoreId" type="id-ne"></field>
@@ -79,7 +79,7 @@
     <!-- org.ofbiz.googlecheckout.shipping -->
     <!-- ========================================================= -->
     
-    <entity entity-name="GoogleCheckoutShippingMethod"
+    <entity entity-name="GoogleCoShippingMethod"
             package-name="org.ofbiz.googlecheckout.shipping"
             title="Google Shipping Method Config">
         <field name="shipmentMethodName" type="id-ne"></field>

Modified: ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml?rev=781689&r1=781688&r2=781689&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/servicedef/services.xml Thu Jun  4 09:14:51 2009
@@ -44,33 +44,33 @@
     <!-- End Old Implementation to send data in XML format -->
     
     <!-- Start configuration services -->
-    <service name="createGoogleCheckoutConfiguration" default-entity-name="GoogleCheckoutConfiguration" engine="entity-auto" invoke="create" auth="true">
-        <description>Create a GoogleCheckoutConfiguration</description>
+    <service name="createGoogleCheckoutConfiguration" default-entity-name="GoogleCoConfiguration" engine="entity-auto" invoke="create" auth="true">
+        <description>Create a GoogleCoConfiguration</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateGoogleCheckoutConfiguration" default-entity-name="GoogleCheckoutConfiguration" engine="entity-auto" invoke="update" auth="true">
-        <description>Update a GoogleCheckoutConfiguration</description>
+    <service name="updateGoogleCheckoutConfiguration" default-entity-name="GoogleCoConfiguration" engine="entity-auto" invoke="update" auth="true">
+        <description>Update a GoogleCoConfiguration</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="deleteGoogleCheckoutConfiguration" default-entity-name="GoogleCheckoutConfiguration" engine="entity-auto" invoke="delete" auth="true">
-        <description>Delete a GoogleCheckoutConfiguration</description>
+    <service name="deleteGoogleCheckoutConfiguration" default-entity-name="GoogleCoConfiguration" engine="entity-auto" invoke="delete" auth="true">
+        <description>Delete a GoogleCoConfiguration</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
 
-    <service name="createGoogleCheckoutShippingMethod" default-entity-name="GoogleCheckoutShippingMethod" engine="entity-auto" invoke="create" auth="true">
-        <description>Create a GoogleCheckoutShippingMethod</description>
+    <service name="createGoogleCheckoutShippingMethod" default-entity-name="GoogleCoShippingMethod" engine="entity-auto" invoke="create" auth="true">
+        <description>Create a GoogleCoShippingMethod</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateGoogleCheckoutShippingMethod" default-entity-name="GoogleCheckoutShippingMethod" engine="entity-auto" invoke="update" auth="true">
-        <description>Update a GoogleCheckoutShippingMethod</description>
+    <service name="updateGoogleCheckoutShippingMethod" default-entity-name="GoogleCoShippingMethod" engine="entity-auto" invoke="update" auth="true">
+        <description>Update a GoogleCoShippingMethod</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="deleteGoogleCheckoutShippingMethod" default-entity-name="GoogleCheckoutShippingMethod" engine="entity-auto" invoke="delete" auth="true">
-        <description>Delete a GoogleCheckoutShippingMethod</description>
+    <service name="deleteGoogleCheckoutShippingMethod" default-entity-name="GoogleCoShippingMethod" engine="entity-auto" invoke="delete" auth="true">
+        <description>Delete a GoogleCoShippingMethod</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- End configuration services -->

Modified: ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java?rev=781689&r1=781688&r2=781689&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java Thu Jun  4 09:14:51 2009
@@ -335,7 +335,7 @@
         String shippingName = shipping.getShippingName();        
         GenericValue googleShipping = null;        
         try {
-            googleShipping = delegator.findOne("GoogleCheckoutShippingMethod", UtilMisc.toMap("shipmentMethodName", shippingName,
+            googleShipping = delegator.findOne("GoogleCoShippingMethod", UtilMisc.toMap("shipmentMethodName", shippingName,
                     "productStoreId", cart.getProductStoreId()), false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);

Modified: ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java?rev=781689&r1=781688&r2=781689&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleRequestServices.java Thu Jun  4 09:14:51 2009
@@ -129,7 +129,7 @@
         // setup shipping options support
         List<GenericValue> shippingOptions = null;
         try {
-            shippingOptions = delegator.findByAnd("GoogleCheckoutShippingMethod", UtilMisc.toMap("productStoreId", productStoreId));
+            shippingOptions = delegator.findByAnd("GoogleCoShippingMethod", UtilMisc.toMap("productStoreId", productStoreId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -616,7 +616,7 @@
         if (productStoreId == null) return null;
         GenericValue config = null;
         try {
-            config = delegator.findOne("GoogleCheckoutConfiguration", true, "productStoreId", productStoreId);
+            config = delegator.findOne("GoogleCoConfiguration", true, "productStoreId", productStoreId);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }

Modified: ofbiz/trunk/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml?rev=781689&r1=781688&r2=781689&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/widget/GoogleCheckoutForms.xml Thu Jun  4 09:14:51 2009
@@ -24,7 +24,7 @@
     <form name="ListGoogleCheckoutConfigurations" type="list"  list-name="googleCheckoutConfigurations"  target="updateGoogleCheckoutConfiguration"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
-            <entity-condition entity-name="GoogleCheckoutConfiguration">
+            <entity-condition entity-name="GoogleCoConfiguration">
                 <order-by field-name="productStoreId"/>
             </entity-condition>
         </actions>
@@ -114,7 +114,7 @@
     <form name="ListGoogleCheckoutShippingMethods" type="list"  list-name="googleCheckoutShippingMethods"  target="updateGoogleCheckoutShippingMethod"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
-            <entity-condition entity-name="GoogleCheckoutShippingMethod">
+            <entity-condition entity-name="GoogleCoShippingMethod">
                 <order-by field-name="shipmentMethodName"/>
                 <order-by field-name="productStoreId"/>
             </entity-condition>