Author: deepak
Date: Tue Oct 18 19:06:45 2016
New Revision: 1765497
URL: http://svn.apache.org/viewvc?rev=1765497&view=rev
Log:
Improved: Converted some GlAccount related CRUD services from simple to
entity-auto.
(OFBIZ-8378)(OFBIZ-8377)(OFBIZ-8387)(OFBIZ-8386)(OFBIZ-8385)
Thanks Pawan Verma for your contribution.
Modified:
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
Modified:
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml?rev=1765497&r1=1765496&r2=1765497&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
(original)
+++
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
Tue Oct 18 19:06:45 2016
@@ -21,36 +21,6 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
- <!-- ========= GlAccount methods ========= -->
- <simple-method method-name="createGlAccount" short-description="Create an
GlAccount">
- <make-value entity-name="GlAccount" value-field="newEntity"/>
- <set-nonpk-fields map="parameters" value-field="newEntity"/>
-
- <!-- GlAccount uses a sequenced id, so get the next one now and set
it... -->
- <if-empty field="parameters.glAccountId">
- <sequenced-id sequence-name="GlAccount"
field="newEntity.glAccountId"/>
- <else>
- <set-pk-fields map="parameters" value-field="newEntity"/>
- </else>
- </if-empty>
- <field-to-result field="newEntity.glAccountId"
result-name="glAccountId"/>
-
- <create-value value-field="newEntity"/>
- </simple-method>
- <simple-method method-name="updateGlAccount" short-description="Update an
GlAccount">
- <make-value entity-name="GlAccount" value-field="lookupPKMap"/>
- <set-pk-fields map="parameters" value-field="lookupPKMap"/>
- <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
- <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
- <store-value value-field="lookedUpValue"/>
- </simple-method>
- <simple-method method-name="deleteGlAccount" short-description="Delete an
GlAccount">
- <make-value entity-name="GlAccount" value-field="lookupPKMap"/>
- <set-pk-fields map="parameters" value-field="lookupPKMap"/>
- <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
- <remove-value value-field="lookedUpValue"/>
- </simple-method>
-
<!-- ========= GlJournal methods ========= -->
<simple-method method-name="quickCreateAcctgTransAndEntries"
short-description="Creates an AcctgTrans and two offsetting AcctgTransEntry
records">
<!-- TODO: Do we need to create a GlJournal record here? -->
@@ -2648,25 +2618,6 @@ under the License.
<field-to-result field="acctgTransId" result-name="acctgTransId"/>
</simple-method>
- <!-- Party GlAccount services -->
- <simple-method method-name="createPartyGlAccount"
short-description="Associate a party to a General Ledger Account">
- <make-value entity-name="PartyGlAccount" value-field="newEntity"/>
- <set-pk-fields map="parameters" value-field="newEntity"/>
- <set-nonpk-fields map="parameters" value-field="newEntity"/>
- <create-value value-field="newEntity"/>
- </simple-method>
-
- <simple-method method-name="updatePartyGlAccount"
short-description="Update an existing General Ledger Account of a Party">
- <entity-one entity-name="PartyGlAccount" value-field="lookedUpValue"/>
- <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
- <store-value value-field="lookedUpValue"/>
- </simple-method>
-
- <simple-method method-name="deletePartyGlAccount"
short-description="Delete an existing General Ledger Account of a Party">
- <entity-one entity-name="PartyGlAccount" value-field="lookedUpValue"/>
- <remove-value value-field="lookedUpValue"/>
- </simple-method>
-
<!-- Entity Specific Inline Methods -->
<simple-method method-name="getVarianceReasonGlAccountInline"
short-description="Gets VarianceReasonGlAccount on the basis of primary key">
<entity-one entity-name="VarianceReasonGlAccount"
value-field="varianceReasonGlAccount">
Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=1765497&r1=1765496&r2=1765497&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
(original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Tue Oct
18 19:06:45 2016
@@ -27,26 +27,23 @@ under the License.
<!-- ========= General Ledger Services ========= -->
<!-- GlAccount & Related -->
- <service name="createGlAccount" default-entity-name="GlAccount"
engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="createGlAccount" auth="true">
+ <service name="createGlAccount" default-entity-name="GlAccount"
engine="entity-auto" invoke="create" auth="true">
<description>Create a GlAccount record</description>
<permission-service service-name="basicGeneralLedgerPermissionCheck"
main-action="CREATE"/>
- <auto-attributes include="pk" mode="OUT" optional="false"/>
- <auto-attributes include="all" mode="IN" optional="true"/>
+ <auto-attributes include="pk" mode="INOUT" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="glAccountTypeId" optional="false"/>
<override name="glAccountClassId" optional="false"/>
<override name="glResourceTypeId" optional="false"/>
<override name="accountName" optional="false"/>
</service>
- <service name="updateGlAccount" default-entity-name="GlAccount"
engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="updateGlAccount" auth="true">
+ <service name="updateGlAccount" default-entity-name="GlAccount"
engine="entity-auto" invoke="update" auth="true">
<description>Update a GlAccount record</description>
<permission-service service-name="basicGeneralLedgerPermissionCheck"
main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="deleteGlAccount" default-entity-name="GlAccount"
engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="deleteGlAccount" auth="true">
+ <service name="deleteGlAccount" default-entity-name="GlAccount"
engine="entity-auto" invoke="delete" auth="true">
<description>Delete a GlAccount record</description>
<permission-service service-name="basicGeneralLedgerPermissionCheck"
main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
@@ -520,22 +517,19 @@ under the License.
</service>
<!-- Party GlAccount services -->
- <service name="createPartyGlAccount" default-entity-name="PartyGlAccount"
engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="createPartyGlAccount" auth="true">
+ <service name="createPartyGlAccount" default-entity-name="PartyGlAccount"
engine="entity-auto" invoke="create" auth="true">
<description>Associate a party to a General Ledger
Account</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<attribute name="glAccountId" type="String" mode="IN"
optional="false"/>
</service>
- <service name="updatePartyGlAccount" default-entity-name="PartyGlAccount"
engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="updatePartyGlAccount" auth="true">
+ <service name="updatePartyGlAccount" default-entity-name="PartyGlAccount"
engine="entity-auto" invoke="update" auth="true">
<description>Update an existing General Ledger Account of a
Party</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<attribute name="glAccountId" type="String" mode="IN"
optional="false"/>
</service>
- <service name="deletePartyGlAccount" default-entity-name="PartyGlAccount"
engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="deletePartyGlAccount" auth="true">
+ <service name="deletePartyGlAccount" default-entity-name="PartyGlAccount"
engine="entity-auto" invoke="delete" auth="true">
<description>Delete an existing General Ledger Account of a
Party</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
@@ -709,7 +703,7 @@ under the License.
</service>
<service name="createAcctgTransEntryType" engine="entity-auto"
default-entity-name="AcctgTransEntryType" invoke="create" auth="true">
- <auto-attributes mode=" INOUT" include="pk" optional="true"/>
+ <auto-attributes mode="INOUT" include="pk" optional="true"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
</service>