svn commit: r1802656 - in /ofbiz/ofbiz-framework/trunk/applications/content: minilang/content/ContentServices.xml servicedef/services_commevent.xml

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

svn commit: r1802656 - in /ofbiz/ofbiz-framework/trunk/applications/content: minilang/content/ContentServices.xml servicedef/services_commevent.xml

Arun Patidar-4
Author: arunpatidar
Date: Sat Jul 22 05:43:28 2017
New Revision: 1802656

URL: http://svn.apache.org/viewvc?rev=1802656&view=rev
Log:
Improvements in CommEventContentAssoc entity definition and services. (OFBIZ-8843)
Thanks Rishi Solanki for your contribution.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml
    ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml?rev=1802656&r1=1802655&r2=1802656&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml Sat Jul 22 05:43:28 2017
@@ -567,33 +567,6 @@
         <field-to-result field="commEventContentAssoc.fromDate" result-name="fromDate"/>
     </simple-method>
 
-    <!-- This service would primarily be used to update the thruDate field.
-        -->
-    <simple-method method-name="updateCommEventContentAssoc" short-description="Update CommEventContentAssoc">
-        <make-value entity-name="CommEventContentAssoc" value-field="pkCommEventContentAssoc"/>
-        <set-pk-fields value-field="pkCommEventContentAssoc" map="parameters"/>
-        <find-by-primary-key entity-name="CommEventContentAssoc" map="pkCommEventContentAssoc" value-field="commEventContentAssoc"/>
-        <if-empty field="commEventContentAssoc">
-            <add-error>
-                <fail-property resource="ContentUiLabels" property="ContenCommEventContentAssocNotFoundForUpdate"/>
-            </add-error>
-        </if-empty>
-        <set-nonpk-fields map="parameters" value-field="commEventContentAssoc"/>
-        <store-value value-field="commEventContentAssoc"/>
-    </simple-method>
-
-    <simple-method method-name="removeCommEventContentAssoc" short-description="Delete CommEventContentAssoc">
-        <make-value entity-name="CommEventContentAssoc" value-field="pkCommEventContentAssoc"/>
-        <set-pk-fields value-field="pkCommEventContentAssoc" map="parameters"/>
-        <find-by-primary-key entity-name="CommEventContentAssoc" map="pkCommEventContentAssoc" value-field="commEventContentAssoc"/>
-        <if-empty field="commEventContentAssoc">
-            <add-error>
-                <fail-property resource="ContentUiLabels" property="ContenCommEventContentAssocNotFoundForDelete"/>
-            </add-error>
-        </if-empty>
-        <remove-value value-field="commEventContentAssoc"/>
-    </simple-method>
-
     <!-- simply use createContent and the accoc will be created too" the service below +aca will create 2 contentAssocs-->
     <!--simple-method method-name="createContentAndAssoc" short-description="Create content and associate with other content">
         <set-service-fields service-name="createContent" map="parameters" to-map="contentData"/>

Modified: ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml?rev=1802656&r1=1802655&r2=1802656&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_commevent.xml Sat Jul 22 05:43:28 2017
@@ -66,8 +66,7 @@ under the License.
          <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
     </service>
 
-    <service name="updateCommEventContentAssoc" engine="simple"
-                location="component://content/minilang/content/ContentServices.xml" invoke="updateCommEventContentAssoc" auth="true">
+    <service name="updateCommEventContentAssoc" default-entity-name="CommEventContentAssoc" engine="entity-auto" invoke="update" auth="true">
         <description>Update CommEventContentAssoc</description>
         <attribute name="communicationEventId" type="String" mode="IN" optional="false"/>
         <attribute name="contentId" type="String" mode="IN" optional="false"/>
@@ -76,12 +75,9 @@ under the License.
          <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
     </service>
 
-    <service name="removeCommEventContentAssoc" engine="simple"
-                location="component://content/minilang/content/ContentServices.xml" invoke="removeCommEventContentAssoc" auth="true">
+    <service name="removeCommEventContentAssoc" default-entity-name="CommContentAssocType" engine="entity-auto" invoke="delete" auth="true">
         <description>Remove CommEventContentAssoc</description>
-        <attribute name="communicationEventId" type="String" mode="IN" optional="false"/>
-        <attribute name="contentId" type="String" mode="IN" optional="false"/>
-        <attribute name="fromDate" type="java.sql.Timestamp" mode="IN" optional="false"/>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
 
     <service name="createCommContentAssocType" default-entity-name="CommContentAssocType" engine="entity-auto" invoke="create" auth="true">