[ofbiz-framework] branch trunk updated: Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto (#92)

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

[ofbiz-framework] branch trunk updated: Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto (#92)

surajk
This is an automated email from the ASF dual-hosted git repository.

surajk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f36a15b  Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto (#92)
f36a15b is described below

commit f36a15b5a0b3f3f8426e348ad5753661cecb418f
Author: Suraj Khurana <[hidden email]>
AuthorDate: Sat May 2 14:21:10 2020 +0530

    Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto (#92)
   
    * Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto
    (OFBIZ-11625)
---
 .../marketing/tracking/TrackingCodeServices.xml    | 24 ----------------------
 applications/marketing/servicedef/services.xml     |  8 +++-----
 2 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml b/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
index aa28a84..44cc853 100644
--- a/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
+++ b/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
@@ -20,30 +20,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">
-    <simple-method method-name="createTrackingCodeOrder" short-description="Create an TrackingCodeOrder">
-        <now-timestamp field="nowStamp"/>
-        <make-value entity-name="TrackingCodeOrder" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-
-        <!-- set the history/audit info -->
-        <set from-field="nowStamp" field="newEntity.createdStamp"/>
-
-        <create-value value-field="newEntity"/>
-    </simple-method>
-    <simple-method method-name="updateTrackingCodeOrder" short-description="Update an TrackingCodeOrder">
-        <now-timestamp field="nowStamp"/>
-
-        <make-value entity-name="TrackingCodeOrder" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key entity-name="TrackingCodeOrder" map="lookupPKMap" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-
-        <!-- set the history/audit info -->
-        <set from-field="userLogin.userLoginId" field="newEntity.lastModifiedByUserLogin"/>
-        <set from-field="lastModifiedDate" field="newEntity.createdDate"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
     <simple-method method-name="createTrackingCodeOrderReturns" short-description="Create TrackingCodeOrderReturn for all the Return Items with Orders that have trackingCodeOrder entry">
         <if-not-empty field="parameters.returnId">
             <set field="returnHeaderFindContext.returnId" from-field="parameters.returnId"/>
diff --git a/applications/marketing/servicedef/services.xml b/applications/marketing/servicedef/services.xml
index 82fbf1a..7825290 100644
--- a/applications/marketing/servicedef/services.xml
+++ b/applications/marketing/servicedef/services.xml
@@ -432,16 +432,14 @@ under the License.
         <attribute name="areRelated" type="String" mode="OUT" optional="false"><!-- will be Y or N --></attribute>
     </service>
 
-    <!-- Tracking Code Order return  -->
-    <service name="createTrackingCodeOrder" default-entity-name="TrackingCodeOrder" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="createTrackingCodeOrder">
+    <!-- Tracking Code Order -->
+    <service name="createTrackingCodeOrder" default-entity-name="TrackingCodeOrder" engine="entity-auto" invoke="create">
         <description>Create a TrackingCodeOrder record</description>
         <permission-service service-name="marketingPermissionService" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateTrackingCodeOrder" default-entity-name="TrackingCodeOrder" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="updateTrackingCodeOrder">
+    <service name="updateTrackingCodeOrder" default-entity-name="TrackingCodeOrder" engine="entity-auto" invoke="update">
         <description>Update a TrackingCode record</description>
         <permission-service service-name="marketingPermissionService" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>