Author: deepak
Date: Tue Oct 18 19:33:49 2016
New Revision: 1765500
URL: http://svn.apache.org/viewvc?rev=1765500&view=rev
Log:
Improved: Converted some CRUD services from simple to entity-auto.
(OFBIZ-8384)(OFBIZ-8388)(OFBIZ-8295)(OFBIZ-8294)(OFBIZ-8389)(OFBIZ-8390)(OFBIZ-8391)(OFBIZ-8392)(OFBIZ-8393)(OFBIZ-8407)
Thanks Pawan Verma for your contribution.
Modified:
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
ofbiz/trunk/applications/accounting/minilang/payment/PaymentMethodServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml
ofbiz/trunk/applications/content/minilang/data/DataServices.xml
ofbiz/trunk/applications/content/servicedef/services.xml
ofbiz/trunk/applications/order/minilang/order/OrderReturnServices.xml
ofbiz/trunk/applications/order/minilang/order/OrderServices.xml
ofbiz/trunk/applications/order/servicedef/services_return.xml
ofbiz/trunk/applications/party/minilang/party/PartyServices.xml
ofbiz/trunk/applications/party/servicedef/services.xml
ofbiz/trunk/applications/product/minilang/product/product/ProductServices.xml
ofbiz/trunk/applications/product/servicedef/services.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=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
(original)
+++
ofbiz/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml
Tue Oct 18 19:33:49 2016
@@ -146,10 +146,6 @@ under the License.
<set from-field="userLogin.userLoginId"
field="lookedUpValue.lastModifiedByUserLogin"/>
<store-value value-field="lookedUpValue"/>
</simple-method>
- <simple-method method-name="deleteGlReconciliation"
short-description="Delete an GlReconciliation">
- <entity-one entity-name="GlReconciliation"
value-field="lookedUpValue"/>
- <remove-value value-field="lookedUpValue"/>
- </simple-method>
<simple-method method-name="updateGlReconciliationLastModified"
short-description="Update GlReconciliation LastModified Info">
<!-- this is just a little method that is meant to be called as an
inline call-simple-method target with the context already setup -->
<entity-one entity-name="GlReconciliation" value-field="lookedUpGLR"/>
Modified:
ofbiz/trunk/applications/accounting/minilang/payment/PaymentMethodServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/minilang/payment/PaymentMethodServices.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/minilang/payment/PaymentMethodServices.xml
(original)
+++
ofbiz/trunk/applications/accounting/minilang/payment/PaymentMethodServices.xml
Tue Oct 18 19:33:49 2016
@@ -98,13 +98,6 @@ under the License.
<field-to-result result-name="paymentMethodId"
field="newPaymentMethod.paymentMethodId"/>
</simple-method>
- <simple-method method-name="updatePayPalPaymentMethod"
short-description="Update a PayPal Payment Method">
- <entity-one value-field="payPalPaymentMethod"
entity-name="PayPalPaymentMethod"/>
- <set-nonpk-fields value-field="payPalPaymentMethod" map="parameters"/>
- <store-value value-field="payPalPaymentMethod"/>
- <field-to-result result-name="paymentMethodId"
field="payPalPaymentMethod.paymentMethodId"/>
- </simple-method>
-
<simple-method method-name="createPaymentGroupMember"
short-description="Check For Outgoing/Incoming Payment And Create Payment Group
Member">
<make-value entity-name="PaymentGroupMember"
value-field="newPaymentGroupMember"/>
<set-pk-fields map="parameters" value-field="newPaymentGroupMember"/>
Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
(original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Tue Oct
18 19:33:49 2016
@@ -143,8 +143,7 @@ under the License.
<exclude field-name="lastModifiedByUserLogin"/>
</auto-attributes>
</service>
- <service name="deleteGlReconciliation"
default-entity-name="GlReconciliation" engine="simple"
-
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml"
invoke="deleteGlReconciliation" auth="true">
+ <service name="deleteGlReconciliation"
default-entity-name="GlReconciliation" engine="entity-auto" invoke="delete"
auth="true">
<description>Delete a GlReconciliation record</description>
<permission-service service-name="basicGeneralLedgerPermissionCheck"
main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
Modified:
ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml
(original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml
Tue Oct 18 19:33:49 2016
@@ -224,8 +224,7 @@ under the License.
<attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
<attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
</service>
- <service name="updatePayPalPaymentMethod" engine="simple"
-
location="component://accounting/minilang/payment/PaymentMethodServices.xml"
invoke="updatePayPalPaymentMethod" auth="true">
+ <service name="updatePayPalPaymentMethod" engine="entity-auto"
default-entity-name="PayPalPaymentMethod" invoke="update" auth="true">
<description>Update a PayPal Payment Method</description>
<attribute name="paymentMethodId" mode="INOUT" type="String"
optional="false"/>
<auto-attributes mode="IN" entity-name="PayPalPaymentMethod"
include="nonpk" optional="true"/>
Modified: ofbiz/trunk/applications/content/minilang/data/DataServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/minilang/data/DataServices.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/minilang/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/minilang/data/DataServices.xml Tue Oct 18
19:33:49 2016
@@ -91,21 +91,6 @@ under the License.
<if-compare field="dataResource.dataResourceTypeId" operator="equals"
value="IMAGE_OBJECT"><return
response-code="${dataResource.dataResourceTypeId}"/></if-compare>
</simple-method>
- <!-- Methods for DataCategory -->
- <simple-method method-name="updateDataCategory" short-description="Update
Data Category">
- <make-value entity-name="DataCategory" value-field="lookupKeyValue"/>
- <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
- <find-by-primary-key entity-name="DataCategory" map="lookupKeyValue"
value-field="lookedUpValue"/>
- <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
- <store-value value-field="lookedUpValue"/>
- </simple-method>
- <simple-method method-name="removeDataCategory" short-description="Remove
Data DateCategory">
- <make-value entity-name="DataCategory" value-field="lookupKeyValue"/>
- <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
- <find-by-primary-key entity-name="DataCategory" map="lookupKeyValue"
value-field="lookedUpValue"/>
- <remove-value value-field="lookedUpValue"/>
- </simple-method>
-
<!--
getElectronicText
Passed a Content GenericValue or a contentId, this service returns the
text data from
Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Tue Oct 18
19:33:49 2016
@@ -86,15 +86,13 @@
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="updateDataCategory" engine="simple"
default-entity-name="DataCategory" auth="true"
- location="component://content/minilang/data/DataServices.xml"
invoke="updateDataCategory">
+ <service name="updateDataCategory" engine="entity-auto"
default-entity-name="DataCategory" auth="true" invoke="update">
<description>Update a DataCategory</description>
<permission-service service-name="contentManagerPermission"
main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="removeDataCategory" engine="simple"
default-entity-name="DataCategory" auth="true"
- location="component://content/minilang/data/DataServices.xml"
invoke="removeDataCategory">
+ <service name="removeDataCategory" engine="entity-auto"
default-entity-name="DataCategory" auth="true" invoke="delete">
<description>Remove DataCategory</description>
<permission-service service-name="contentManagerPermission"
main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
Modified: ofbiz/trunk/applications/order/minilang/order/OrderReturnServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/minilang/order/OrderReturnServices.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/minilang/order/OrderReturnServices.xml
(original)
+++ ofbiz/trunk/applications/order/minilang/order/OrderReturnServices.xml Tue
Oct 18 19:33:49 2016
@@ -592,13 +592,6 @@ under the License.
<!-- return the current return header status -->
<field-to-result field="returnHeader.statusId"
result-name="returnHeaderStatus"/>
</simple-method>
- <simple-method method-name="createReturnItemResponse"
short-description="Create a ReturnItemResponse">
- <make-value value-field="newEntity" entity-name="ReturnItemResponse"/>
- <sequenced-id sequence-name="ReturnItemResponse"
field="newEntity.returnItemResponseId"/>
- <set-nonpk-fields map="parameters" value-field="newEntity"/>
- <create-value value-field="newEntity"/>
- <field-to-result field="newEntity.returnItemResponseId"
result-name="returnItemResponseId"/>
- </simple-method>
<simple-method method-name="quickReturnFromOrder"
short-description="Create Quick Return From Order">
<if>
@@ -829,13 +822,6 @@ under the License.
<field-to-result field="returnItemSeqId"
result-name="returnItemSeqId"/>
</simple-method>
- <simple-method method-name="createReturnItemBilling"
short-description="Create a ReturnItemBilling">
- <make-value entity-name="ReturnItemBilling" value-field="newEntity"/>
- <set-nonpk-fields map="parameters" value-field="newEntity"/>
- <set-pk-fields map="parameters" value-field="newEntity"/>
- <create-value value-field="newEntity"/>
- </simple-method>
-
<simple-method method-name="cancelReturnItems" short-description="Update a
ReturnItems">
<check-permission permission="ORDERMGR"
action="_UPDATE"><fail-property resource="OrderErrorUiLabels"
property="OrderSecurityErrorToRunCancelReturnItems"/></check-permission>
<check-errors/>
Modified: ofbiz/trunk/applications/order/minilang/order/OrderServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/minilang/order/OrderServices.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/minilang/order/OrderServices.xml (original)
+++ ofbiz/trunk/applications/order/minilang/order/OrderServices.xml Tue Oct 18
19:33:49 2016
@@ -776,15 +776,6 @@ under the License.
<field-to-result field="orderItemShipGroupInvRes.promisedDatetime"
result-name="estimatedShipDate"/>
</simple-method>
- <simple-method method-name="removeOrderContactMech"
short-description="Remove OrderContactMech">
- <check-permission permission="ORDERMGR" action="_DELETE">
- <fail-property resource="OrderErrorUiLabels"
property="OrderSecurityErrorToRunRemoveOrderContactMech"/>
- </check-permission>
- <check-errors/>
- <entity-one entity-name="OrderContactMech"
value-field="lookedUpValue"/>
- <remove-value value-field="lookedUpValue"/>
- </simple-method>
-
<simple-method method-name="updateOrderNote" short-description="Update
OrderNote">
<check-permission permission="ORDERMGR" action="_UPDATE">
<fail-property resource="OrderErrorUiLabels"
property="OrderSecurityErrorToRunUpdateOrderNote"/>
Modified: ofbiz/trunk/applications/order/servicedef/services_return.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_return.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_return.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_return.xml Tue Oct 18
19:33:49 2016
@@ -48,8 +48,7 @@ under the License.
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="oldStatusId" type="String" mode="OUT"
optional="false"/>
</service>
- <service name="createReturnItemBilling" engine="simple"
default-entity-name="ReturnItemBilling"
-
location="component://order/minilang/order/OrderReturnServices.xml"
invoke="createReturnItemBilling">
+ <service name="createReturnItemBilling" engine="entity-auto"
default-entity-name="ReturnItemBilling" invoke="create">
<description>Create a new return item billing record</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
@@ -89,8 +88,7 @@ under the License.
<description>Remove a ReturnItem and related adjustments</description>
<auto-attributes entity-name="ReturnItem" include="pk" mode="IN"
optional="false"/>
</service>
- <service name="createReturnItemResponse" engine="simple"
-
location="component://order/minilang/order/OrderReturnServices.xml"
invoke="createReturnItemResponse">
+ <service name="createReturnItemResponse" engine="entity-auto"
invoke="create">
<description>Creates a ReturnItemResponse record.</description>
<auto-attributes entity-name="ReturnItemResponse" include="nonpk"
mode="IN" optional="true"/>
<attribute name="returnItemResponseId" type="String" mode="OUT"
optional="false"/>
Modified: ofbiz/trunk/applications/party/minilang/party/PartyServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/minilang/party/PartyServices.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/minilang/party/PartyServices.xml (original)
+++ ofbiz/trunk/applications/party/minilang/party/PartyServices.xml Tue Oct 18
19:33:49 2016
@@ -785,11 +785,6 @@ under the License.
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<create-value value-field="newEntity"/>
</simple-method>
- <simple-method method-name="deleteAddressMatchMap"
short-description="remove a AddressMatchMap">
- <make-value entity-name="AddressMatchMap" value-field="fieldMap"/>
- <set-pk-fields map="parameters" value-field="fieldMap"/>
- <remove-value value-field="fieldMap"/>
- </simple-method>
<simple-method method-name="clearAddressMatchMap"
short-description="remove all AddressMatchMap">
<entity-condition entity-name="AddressMatchMap" list="addrs">
<use-iterator/>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Tue Oct 18 19:33:49
2016
@@ -40,8 +40,7 @@ under the License.
<attribute name="_uploadedFile_fileName" type="String" mode="IN"
optional="false"/>
<attribute name="_uploadedFile_contentType" type="String" mode="IN"
optional="false"/>
</service>
- <service name="removeAddressMatchMap" engine="simple"
default-entity-name="AddressMatchMap" auth="true"
- location="component://party/minilang/party/PartyServices.xml"
invoke="deleteAddressMatchMap">
+ <service name="removeAddressMatchMap" engine="entity-auto"
default-entity-name="AddressMatchMap" auth="true" invoke="delete">
<description>Delete an AddressMatchMap record</description>
<permission-service service-name="partyBasePermissionCheck"
main-action="DELETE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
Modified:
ofbiz/trunk/applications/product/minilang/product/product/ProductServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/minilang/product/product/ProductServices.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
---
ofbiz/trunk/applications/product/minilang/product/product/ProductServices.xml
(original)
+++
ofbiz/trunk/applications/product/minilang/product/product/ProductServices.xml
Tue Oct 18 19:33:49 2016
@@ -779,18 +779,6 @@ under the License.
<remove-value value-field="lookedUpValue"/>
</simple-method>
- <simple-method method-name="createVendorProduct" short-description="Create
a VendorProduct">
- <make-value entity-name="VendorProduct" value-field="newEntity"/>
- <set-pk-fields value-field="newEntity" map="parameters"/>
- <create-value value-field="newEntity"/>
- </simple-method>
-
- <simple-method method-name="deleteVendorProduct" short-description="Remove
the VendorProduct">
- <make-value entity-name="VendorProduct" value-field="lookedUpValue"/>
- <set-pk-fields value-field="lookedUpValue" map="parameters"/>
- <remove-value value-field="lookedUpValue"/>
- </simple-method>
-
<!-- ProductCategoryGlAccount methods -->
<simple-method method-name="createProductCategoryGlAccount"
short-description="Create a ProductCategoryGlAccount">
<set value="createProductCategoryGlAccount" field="callingMethodName"/>
Modified: ofbiz/trunk/applications/product/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?rev=1765500&r1=1765499&r2=1765500&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services.xml Tue Oct 18
19:33:49 2016
@@ -1275,12 +1275,10 @@ under the License.
</service>
<!--VendorProduct Services -->
- <service name="createVendorProduct" engine="simple"
default-entity-name="VendorProduct"
-
location="component://product/minilang/product/product/ProductServices.xml"
invoke="createVendorProduct" auth="true">
+ <service name="createVendorProduct" engine="entity-auto"
default-entity-name="VendorProduct" invoke="create" auth="true">
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
- <service name="deleteVendorProduct" engine="simple"
default-entity-name="VendorProduct"
-
location="component://product/minilang/product/product/ProductServices.xml"
invoke="deleteVendorProduct" auth="true">
+ <service name="deleteVendorProduct" engine="entity-auto"
default-entity-name="VendorProduct" invoke="delete" auth="true">
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>