You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2016/10/17 15:56:27 UTC

svn commit: r1765319 - in /ofbiz/trunk/applications/content: minilang/data/DataServices.xml servicedef/services_data.xml

Author: deepak
Date: Mon Oct 17 15:56:27 2016
New Revision: 1765319

URL: http://svn.apache.org/viewvc?rev=1765319&view=rev
Log:
Improved: Convert ElectronicText entity related CRUD services from simple to entity-auto.
(OFBIZ-8371)(OFBIZ-8372)

Thanks Pawan Verma for your contribution.

Modified:
    ofbiz/trunk/applications/content/minilang/data/DataServices.xml
    ofbiz/trunk/applications/content/servicedef/services_data.xml

Modified: ofbiz/trunk/applications/content/minilang/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/minilang/data/DataServices.xml?rev=1765319&r1=1765318&r2=1765319&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/minilang/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/minilang/data/DataServices.xml Mon Oct 17 15:56:27 2016
@@ -155,32 +155,6 @@ under the License.
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
-    <!-- Methods for ElectronicText -->
-    <simple-method method-name="createElectronicText" short-description="Create Electronic Text">
-        <make-value entity-name="ElectronicText" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-        <field-to-result result-name="dataResourceId" field="newEntity.dataResourceId"/>
-    </simple-method>
-
-    <simple-method method-name="updateElectronicText" short-description="Update Electronic Text">
-        <make-value entity-name="ElectronicText" value-field="lookupKeyValue"/>
-        <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
-        <find-by-primary-key entity-name="ElectronicText" map="lookupKeyValue" value-field="lookedUpValue"/>
-
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <store-value value-field="lookedUpValue"/>
-        <field-to-result result-name="dataResourceId" field="lookedUpValue.dataResourceId"/>
-    </simple-method>
-    <simple-method method-name="removeElectronicText" short-description="Remove Electronic Text">
-        <make-value entity-name="ElectronicText" value-field="lookupKeyValue"/>
-        <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
-
-        <find-by-primary-key entity-name="ElectronicText" 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_data.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_data.xml?rev=1765319&r1=1765318&r2=1765319&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_data.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_data.xml Mon Oct 17 15:56:27 2016
@@ -100,18 +100,16 @@
     </service>
 
     <!-- ElectronicText services -->
-    <service name="createElectronicText" default-entity-name="ElectronicText" engine="simple"
-            location="component://content/minilang/data/DataServices.xml" invoke="createElectronicText" auth="true">
+    <service name="createElectronicText" default-entity-name="ElectronicText" engine="entity-auto" invoke="create" auth="true">
         <description>Create a ElectronicText</description>
         <permission-service service-name="genericDataResourcePermission" main-action="CREATE"/>
         <implements service="createDataResource"/>
-        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="dataResourceTypeId" default-value="ELECTRONIC_TEXT"/>
         <override name="textData" allow-html="any"/>
     </service>
-    <service name="updateElectronicText" default-entity-name="ElectronicText" engine="simple"
-            location="component://content/minilang/data/DataServices.xml" invoke="updateElectronicText" auth="true">
+    <service name="updateElectronicText" default-entity-name="ElectronicText" engine="entity-auto" invoke="update" auth="true">
         <description>Update a ElectronicText</description>
         <permission-service service-name="genericDataResourcePermission" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="INOUT" optional="false"/>
@@ -119,8 +117,7 @@
         <attribute name="contentId" mode="INOUT" optional="true" type="String"/><!-- to optionaly know where this text is belonging to -->
         <override name="textData" allow-html="any"/>
     </service>
-    <service name="removeElectronicText" default-entity-name="ElectronicText" engine="simple"
-            location="component://content/minilang/data/DataServices.xml" invoke="removeElectronicText" auth="true">
+    <service name="removeElectronicText" default-entity-name="ElectronicText" engine="entity-auto" invoke="delete" auth="true">
         <description>Remove ElectronicText</description>
         <permission-service service-name="genericDataResourcePermission" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>