svn commit: r1816266 - in /ofbiz/ofbiz-framework/trunk/applications/content: minilang/content/ContentServices.xml servicedef/secas.xml servicedef/services.xml

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

svn commit: r1816266 - in /ofbiz/ofbiz-framework/trunk/applications/content: minilang/content/ContentServices.xml servicedef/secas.xml servicedef/services.xml

akashjain
Author: akashjain
Date: Sat Nov 25 08:21:21 2017
New Revision: 1816266

URL: http://svn.apache.org/viewvc?rev=1816266&view=rev
Log:
Improved: Remove unused service checkContentAssocIds and its usage, applied patch from jira issue (OFBIZ-9999)

Thanks, Suraj Khurana for reporting the issue and Sonal Patwari for providing the patch.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml
    ofbiz/ofbiz-framework/trunk/applications/content/servicedef/secas.xml
    ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services.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=1816266&r1=1816265&r2=1816266&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml Sat Nov 25 08:21:21 2017
@@ -587,43 +587,6 @@
         <call-simple-method method-name="getContentAndDataResource"/>
     </simple-method>
 
-    <!-- eca helper services -->
-    <simple-method method-name="checkContentAssocIds" short-description="Checks and prepares contentIdTo and contentId for ContentAssoc service">
-        <if>
-            <condition>
-                <and>
-                    <not>
-                        <if-empty field="parameters.contentIdFrom"/>
-                    </not>
-                    <not>
-                        <if-empty field="parameters.contentId"/>
-                    </not>
-                    <if-empty field="parameters.contentIdTo"/>
-                </and>
-            </condition>
-            <then>
-                <field-to-result field="parameters.contentIdFrom" result-name="contentId"/>
-                <field-to-result field="parameters.contentId" result-name="contentIdTo"/>
-                <log level="info" message="Converted 'contentId' to 'contentIdTo' and 'contentIdFrom' to 'contentId'"/>
-            </then>
-            <else-if>
-                <condition>
-                    <not>
-                        <if-empty field="parameters.contentIdTo"/>
-                    </not>
-                </condition>
-                <then>
-                    <field-to-result field="parameters.contentIdTo" result-name="contentIdTo"/>
-                    <field-to-result field="parameters.contentId" result-name="contentId"/>
-                    <log level="info" message="Returned 'contentId' as 'contentId' and 'contentIdTo' as 'contentIdTo'"/>
-                </then>
-            </else-if>
-            <else>
-                <log level="warning" message="Illegal values passed; should be either contentIdTo/contentId or contentIdFrom/contentId :: ${parameters}"/>
-            </else>
-        </if>
-    </simple-method>
-
     <simple-method method-name="createArticleContent" short-description="Post a new Content article Entry">
         <set field="contentAssocTypeId" from-field="parameters.contentAssocTypeId"/>
         <set field="origContentAssocTypeId" from-field="parameters.contentAssocTypeId"/>

Modified: ofbiz/ofbiz-framework/trunk/applications/content/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/secas.xml?rev=1816266&r1=1816265&r2=1816266&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/servicedef/secas.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/servicedef/secas.xml Sat Nov 25 08:21:21 2017
@@ -139,7 +139,7 @@ under the License.
     </eca>
     <eca service="createContent" event="commit">
         <condition field-name="contentAssocTypeId" operator="is-not-empty"/>
-        <condition field-name="contentIdFrom" operator="is-not-empty"/>
+        <condition field-name="contentId" operator="is-not-empty"/>
         <action service="createContentAssoc" mode="sync" run-as-user="system" result-to-result="true" />
     </eca>
 
@@ -171,13 +171,6 @@ under the License.
         <action service="updateSingleContentPurpose" mode="sync" run-as-user="system"/>
     </eca>
 
-    <!-- content assoc services -->
-    <eca service="createContentAssoc" event="in-validate">
-        <action service="checkContentAssocIds" mode="sync"/>
-    </eca>
-    <eca service="updateContentAssoc" event="in-validate">
-        <action service="checkContentAssocIds" mode="sync"/>
-    </eca>
     <!--
     <eca service="createContent" event="commit">
         <condition field-name="contentId" operator="is-not-empty"/>

Modified: ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services.xml?rev=1816266&r1=1816265&r2=1816266&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services.xml Sat Nov 25 08:21:21 2017
@@ -1161,15 +1161,6 @@
         </attribute>
     </service>
 
-    <!-- eca helper services -->
-    <service name="checkContentAssocIds" engine="simple"
-            location="component://content/minilang/content/ContentServices.xml" invoke="checkContentAssocIds">
-        <description>Fixes the ContentAssoc IDs based on passed parameters</description>
-        <attribute name="contentIdFrom" type="String" mode="INOUT" optional="true"/>
-        <attribute name="contentIdTo" type="String" mode="INOUT" optional="true"/>
-        <attribute name="contentId" type="String" mode="INOUT" optional="true"/>
-    </service>
-
     <!-- content permission services -->
     <service name="contentManagerRolePermission" engine="simple" auth="true"
             location="component://content/minilang/permission/ContentPermissionServices.xml" invoke="contentManagerRolePermission">