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

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

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

Deepak Dixit-5
Author: deepak
Date: Mon Oct 17 15:10:34 2016
New Revision: 1765305

URL: http://svn.apache.org/viewvc?rev=1765305&view=rev
Log:
Improved: Convert MimeType entity related CRUD services from simple to entity-auto.
(OFBIZ-8365)(OFBIZ-8366)(OFBIZ-8367)

Thanks Pawan Verma for your contribution.

Modified:
    ofbiz/trunk/applications/content/minilang/data/DataServices.xml
    ofbiz/trunk/applications/content/servicedef/services_contenttypes.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=1765305&r1=1765304&r2=1765305&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/minilang/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/minilang/data/DataServices.xml Mon Oct 17 15:10:34 2016
@@ -242,28 +242,6 @@ under the License.
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
-    <!-- Methods for MimeType -->
-    <simple-method method-name="createMimeType" short-description="Create MimeType">
-        <make-value entity-name="MimeType" 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="mimeTypeId" field="newEntity.mimeTypeId"/>
-    </simple-method>
-    <simple-method method-name="updateMimeType" short-description="Update MimeType">
-        <make-value entity-name="MimeType" value-field="lookupKeyValue"/>
-        <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
-        <find-by-primary-key entity-name="MimeType" map="lookupKeyValue" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
-    <simple-method method-name="removeMimeType" short-description="Remove MimeType">
-        <make-value entity-name="MimeType" value-field="lookupKeyValue"/>
-        <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
-        <find-by-primary-key entity-name="MimeType" map="lookupKeyValue" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
     <!-- Methods for MimeTypeHtmlTemplate -->
     <simple-method method-name="createMimeTypeHtmlTemplate" short-description="Create MimeTypeHtmlTemplate">
         <make-value entity-name="MimeTypeHtmlTemplate" value-field="newEntity"/>

Modified: ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml?rev=1765305&r1=1765304&r2=1765305&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml Mon Oct 17 15:10:34 2016
@@ -223,20 +223,17 @@ under the License.
     </service>
 
     <!-- MimeType services -->
-    <service name="createMimeType" engine="simple" default-entity-name="MimeType" auth="true"
-            location="component://content/minilang/data/DataServices.xml" invoke="createMimeType">
+    <service name="createMimeType" engine="entity-auto" default-entity-name="MimeType" auth="true" invoke="create">
         <description>Create a MimeType</description>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateMimeType" engine="simple" default-entity-name="MimeType" auth="true"
-            location="component://content/minilang/data/DataServices.xml" invoke="updateMimeType">
+    <service name="updateMimeType" engine="entity-auto" default-entity-name="MimeType" auth="true" invoke="update">
         <description>Update a MimeType</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="removeMimeType" engine="simple" default-entity-name="MimeType" auth="true"
-            location="component://content/minilang/data/DataServices.xml" invoke="removeMimeType">
+    <service name="removeMimeType" engine="entity-auto" default-entity-name="MimeType" auth="true" invoke="delete">
         <description>Remove MimeType</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>