You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/08/21 11:53:23 UTC

svn commit: r687676 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/admin/AcctgAdminServices.xml servicedef/services_admin.xml

Author: lektran
Date: Thu Aug 21 02:53:22 2008
New Revision: 687676

URL: http://svn.apache.org/viewvc?rev=687676&view=rev
Log:
Thought I'd have a go at using the new entity-auto feature

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_admin.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?rev=687676&r1=687675&r2=687676&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml Thu Aug 21 02:53:22 2008
@@ -41,14 +41,6 @@
         <create-value value-name="newEntity"/>
     </simple-method>
     
-    <simple-method method-name="updatePartyAcctgPreference"
-        short-description="Update the accounting preference settings for a party">
-        <!-- permission checking is done in the services definition file (services_other.xml) -->
-        <entity-one entity-name="PartyAcctgPreference" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <store-value value-name="newEntity"/>
-    </simple-method>
-    
     <simple-method method-name="getPartyAccountingPreferences"
             short-description="Get the accounting preference settings for a party (organization)">
         <make-value entity-name="PartyAcctgPreference" value-name="aggregatedPartyAcctgPref" />
@@ -136,72 +128,4 @@
         <set from-field="nowTimestamp" field="createParams.fromDate"/>
         <call-service service-name="createUomConversionDated" in-map-name="createParams"/>
     </simple-method>
-
-    <simple-method method-name="createGlAccountTypeDefault" short-description="Define a default GL account for an Account Type for a certain organisation party.">
-        <make-value entity-name="GlAccountTypeDefault" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <create-value value-name="newEntity"/>
-    </simple-method>
-    <simple-method method-name="removeGlAccountTypeDefault" short-description="Remove a default GL account for an Account Type for a certain organisation party.">
-        <entity-one entity-name="GlAccountTypeDefault" value-name="glAccountTypeDefault"/>
-        <remove-value value-name="glAccountTypeDefault"/>
-    </simple-method>
-
-    <simple-method method-name="addInvoiceItemTypeGlAssignment" short-description="add a override GL account number to a invoice Itemtype for a certain organisation party.">
-        <!--string-to-field string="_CREATE" field-name="securityAction"/>
-        <check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
-        <check-errors/-->
-        <make-value entity-name="InvoiceItemTypeGlAccount" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <create-value value-name="newEntity"/>
-    </simple-method>
-    
-    <simple-method method-name="removeInvoiceItemTypeGlAssignment" short-description="remove a override GL account number from a invoice Itemtype for a certain organisation party.">
-        <!--string-to-field string="_CREATE" field-name="securityAction"/>
-        <check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
-        <check-errors/-->
-        <make-value entity-name="InvoiceItemTypeGlAccount" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <remove-value value-name="newEntity"/>
-    </simple-method>
-
-    <simple-method method-name="addPaymentTypeGlAssignment" short-description="add a default GL account type to a payment Type">
-        <!--string-to-field string="_CREATE" field-name="securityAction"/>
-        <check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
-        <check-errors/-->
-        <make-value entity-name="PaymentGlAccountTypeMap" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <create-value value-name="newEntity"/>  
-    </simple-method>   
-    
-    <simple-method method-name="removePaymentTypeGlAssignment" short-description="remove a default GL account type from a payment Type">
-        <!--string-to-field string="_CREATE" field-name="securityAction"/>
-        <check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
-        <check-errors/-->
-        <make-value entity-name="PaymentGlAccountTypeMap" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <remove-value value-name="newEntity"/>
-    </simple-method>   
-
-    <simple-method method-name="addPaymentMethodTypeGlAssignment" short-description="add a default GL account number to a payment method Type">
-        <!--string-to-field string="_CREATE" field-name="securityAction"/>
-        <check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
-        <check-errors/-->
-        <make-value entity-name="PaymentMethodTypeGlAccount" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <create-value value-name="newEntity"/>  
-    </simple-method>   
-    
-    <simple-method method-name="removePaymentMethodTypeGlAssignment" short-description="remove a default GL account number from a payment method Type">
-        <!--string-to-field string="_CREATE" field-name="securityAction"/>
-        <check-permission permission="EXAMPLE" action="${securityAction}"><fail-property resource="ExampleUiLabels" property="ExamplePermissionError"/></check-permission>
-        <check-errors/-->
-        <make-value entity-name="PaymentMethodTypeGlAccount" value-name="newEntity"/>
-        <set-pk-fields map-name="parameters" value-name="newEntity"/>
-        <remove-value value-name="newEntity"/>
-    </simple-method>   
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_admin.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_admin.xml?rev=687676&r1=687675&r2=687676&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_admin.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_admin.xml Thu Aug 21 02:53:22 2008
@@ -30,14 +30,13 @@
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updatePartyAcctgPreference" default-entity-name="PartyAcctgPreference" engine="simple"
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="updatePartyAcctgPreference" auth="true">
+    <service name="updatePartyAcctgPreference" default-entity-name="PartyAcctgPreference" engine="entity-auto" invoke="update" auth="true">
         <description>Update accounting preferences for a party (organization)</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <!-- the following fields should not be updated because can cause big problems.
-                this allows for the local addition of fields with will appear automagically on the update screen. -->
+                this allows for the local addition of fields which will appear automagically on the update screen. -->
             <exclude field-name="fiscalYearStartMonth"/>
             <exclude field-name="fiscalYearStartDay"/>
             <exclude field-name="taxFormId"/>
@@ -74,52 +73,44 @@
         <attribute type="Timestamp" mode="IN" name="asOfTimestamp" optional="true"/>
     </service>
 
-    <service name="createGlAccountTypeDefault" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="createGlAccountTypeDefault">
+    <service name="createGlAccountTypeDefault" engine="entity-auto" default-entity-name="GlAccountTypeDefault" invoke="create" auth="true">
         <description>Define a default GL account for an Account Type for a certain organisation party.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/>
         <auto-attributes mode="IN" entity-name="GlAccountTypeDefault" include="all" optional="false"/>
     </service>
-    <service name="removeGlAccountTypeDefault" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removeGlAccountTypeDefault">
+    <service name="removeGlAccountTypeDefault" engine="entity-auto" default-entity-name="GlAccountTypeDefault" invoke="delete" auth="true">
         <description>Remove a default GL account for an Account Type for a certain organisation party.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/>
         <auto-attributes mode="IN" entity-name="GlAccountTypeDefault" include="pk" optional="false"/>
     </service>
-    <service name="addInvoiceItemTypeGlAssignment" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addInvoiceItemTypeGlAssignment">
+    <service name="addInvoiceItemTypeGlAssignment" engine="entity-auto" default-entity-name="InvoiceItemTypeGlAccount" invoke="create" auth="true">
         <description>add a override GL account number to a invoice Itemtype for a certain organisation party.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/>
         <auto-attributes mode="IN" entity-name="InvoiceItemTypeGlAccount" include="all" optional="false"/>
     </service>
-    <service name="removeInvoiceItemTypeGlAssignment" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removeInvoiceItemTypeGlAssignment">
+    <service name="removeInvoiceItemTypeGlAssignment" engine="entity-auto" default-entity-name="InvoiceItemTypeGlAccount" invoke="delete" auth="true">
         <description>Remove a override GL account number to a invoice type for a certain organisation party.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/>
         <auto-attributes mode="IN" entity-name="InvoiceItemTypeGlAccount" include="pk" optional="false"/>
     </service>
 
-    <service name="addPaymentTypeGlAssignment" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addPaymentTypeGlAssignment">
+    <service name="addPaymentTypeGlAssignment" engine="entity-auto" default-entity-name="PaymentGlAccountTypeMap" invoke="create" auth="true">
         <description>add a default GL account type to a payment type.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/>
         <auto-attributes mode="IN" entity-name="PaymentGlAccountTypeMap" include="all" optional="false"/>
     </service>
-    <service name="removePaymentTypeGlAssignment" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removePaymentTypeGlAssignment">
+    <service name="removePaymentTypeGlAssignment" engine="entity-auto" default-entity-name="PaymentGlAccountTypeMap" invoke="delete" auth="true">
         <description>Remove a default GL account type from a payment type.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/>
         <auto-attributes mode="IN" entity-name="PaymentGlAccountTypeMap" include="pk" optional="false"/>
     </service>
     
-    <service name="addPaymentMethodTypeGlAssignment" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="addPaymentMethodTypeGlAssignment">
+    <service name="addPaymentMethodTypeGlAssignment" engine="entity-auto" default-entity-name="PaymentMethodTypeGlAccount" invoke="create" auth="true">
         <description>add a default GL account number to a payment method type.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="CREATE"/>
         <auto-attributes mode="IN" entity-name="PaymentMethodTypeGlAccount" include="all" optional="false"/>
     </service>
-    <service name="removePaymentMethodTypeGlAssignment" engine="simple" 
-        location="org/ofbiz/accounting/admin/AcctgAdminServices.xml" invoke="removePaymentMethodTypeGlAssignment">
+    <service name="removePaymentMethodTypeGlAssignment" engine="entity-auto" default-entity-name="PaymentMethodTypeGlAccount" invoke="delete" auth="true">
         <description>Remove a default GL account number from a payment method type.</description>
         <permission-service service-name="acctgPrefPermissionCheck" main-action="DELETE"/>
         <auto-attributes mode="IN" entity-name="PaymentMethodTypeGlAccount" include="pk" optional="false"/>