[ofbiz-framework] branch release18.12 updated: Merge pull request #42 from danwatford/ofbiz-11437-2020-incoterms-improvement

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

[ofbiz-framework] branch release18.12 updated: Merge pull request #42 from danwatford/ofbiz-11437-2020-incoterms-improvement

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 38deff9  Merge pull request #42 from danwatford/ofbiz-11437-2020-incoterms-improvement
38deff9 is described below

commit 38deff91acf1b05e75dc532b3f792368c561330c
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Wed Mar 4 15:01:26 2020 +0100

    Merge pull request #42 from danwatford/ofbiz-11437-2020-incoterms-improvement
   
    OFBIZ-11437: Improved: Added 2020 version of Incoterms
    (cherry picked from commit 7a34e9cda86f7cc8f946377a47c700d6f0b72aa8)
---
 .../content/minilang/content/ContentServices.xml   | 77 ----------------------
 applications/content/servicedef/services.xml       | 27 --------
 2 files changed, 104 deletions(-)

diff --git a/applications/content/minilang/content/ContentServices.xml b/applications/content/minilang/content/ContentServices.xml
index 19f6628..88e08bc 100644
--- a/applications/content/minilang/content/ContentServices.xml
+++ b/applications/content/minilang/content/ContentServices.xml
@@ -720,83 +720,6 @@
         <field-to-result field="contentId"/>
     </simple-method>
 
-    <simple-method method-name="getSubContentWithPermCheck" short-description="Get sub content and perform permission check on each record">
-
-        <set field="filterByDate" from-field="parameters.filterByDate" default-value="true" type="Boolean"/>
-        <set field="useCache" from-field="parameters.useCache" default-value="true" type="Boolean"/>
-        <entity-condition entity-name="ContentAssocViewTo" list="viewList" filter-by-date="${filterByDate}" use-cache="${useCache}">
-          <condition-list combine="and">
-              <condition-expr field-name="contentIdStart" from-field="parameters.contentId"/>
-              <condition-expr field-name="caContentAssocTypeId" from-field="parameters.contentAssocTypeId" ignore-if-empty="true"/>
-              <condition-expr field-name="caMapKey" from-field="parameters.mapKey" ignore-if-empty="true"/>
-          </condition-list>
-        </entity-condition>
-
-        <iterate list="viewList" entry="view">
-            <set field="hasPermission" value="true" type="Boolean"/>
-            <if>
-                <condition>
-                    <and>
-                        <not>
-                            <if-empty field="parameters.mainAction"/>
-                        </not>
-                        <not>
-                            <if-empty field="parameters.userLogin"/>
-                        </not>
-                    </and>
-                </condition>
-                <then>
-                    <set field="inMap.contentId" from-field="parameters.contentId"/>
-                    <set field="inMap.mainAction" from-field="parameters.mainAction"/>
-                    <set field="inMap.userLogin" from-field="parameters.userLogin"/>
-                    <set field="inMap.contentOperationId" from-field="parameters.contentOperationId" default-value="CONTENT_CREATE"/>
-                    <call-service service-name="genericContentPermission" in-map-name="inMap" include-user-login="true">
-                        <result-to-field result-name="hasPermission"/>
-                    </call-service>
-                </then>
-            </if>
-            <if-compare field="hasPermission" operator="equals" value="true" type="Boolean">
-                <set field="contentViewList[]" from-field="view"/>
-            </if-compare>
-        </iterate>
-        <field-to-result field="contentViewList" result-name="subContentList"/>
-
-
-    </simple-method>
-
-    <simple-method method-name="getSubSubContentWithPermCheck" short-description="Get sub content and perform permission check on each record">
-
-        <set-service-fields service-name="getSubContentWithPermCheck" map="parameters" to-map="inMap"/>
-        <call-service service-name="getSubContentWithPermCheck" in-map-name="inMap">
-            <result-to-field result-name="subContentList"/>
-        </call-service>
-
-        <iterate list="subContentList" entry="view">
-            <entity-condition list="viewList" entity-name="ContentAssocViewTo" filter-by-date="true" use-cache="${useCache}">
-              <condition-list combine="and">
-                  <condition-expr field-name="contentIdStart" from-field="view.caContentIdTo"/>
-                  <condition-expr field-name="caContentAssocTypeId" from-field="parameters.subContentAssocTypeId" ignore-if-empty="true"/>
-                  <condition-expr field-name="caMapKey" from-field="parameters.subMapKey" ignore-if-empty="true"/>
-              </condition-list>
-            </entity-condition>
-            <clear-field field="view2"/>
-            <first-from-list list="viewList" entry="view2"/>
-            <clear-field field="map"/>
-            <set field="map.contentIdFrom" from-field="view.contentId"/>
-            <set field="map.dataResourceIdFrom" from-field="view.dataResourceId"/>
-            <set field="map.contentId" from-field="view2.contentId"/>
-            <set field="map.contentName" from-field="view2.contentName"/>
-            <set field="map.description" from-field="view2.description"/>
-            <entity-one entity-name="ElectronicText" value-field="electronicText">
-                <field-map field-name="dataResourceId" from-field="view2.dataResourceId"/>
-            </entity-one>
-            <set field="map.textData" from-field="electronicText.textData"/>
-            <set field="contentViewList[]" from-field="map"/>
-        </iterate>
-        <field-to-result field="subContentList" result-name="subContentList"/>
-        <field-to-result field="contentViewList" result-name="subSubContentList"/>
-    </simple-method>
-
     <simple-method method-name="forceIndexContentKeywords" short-description="induce all the keywords of a content">
         <entity-one entity-name="Content" value-field="content"/>
         <call-class-method class-name="org.apache.ofbiz.content.content.ContentKeywordIndex" method-name="forceIndexKeywords">
diff --git a/applications/content/servicedef/services.xml b/applications/content/servicedef/services.xml
index 7b4392e..53f75f6 100644
--- a/applications/content/servicedef/services.xml
+++ b/applications/content/servicedef/services.xml
@@ -40,33 +40,6 @@
         <attribute mode="OUT" name="resultData" optional="true" type="java.util.Map"/>
     </service>
 
-    <service name="getSubContentWithPermCheck" engine="simple"  auth="true"
-            location="component://content/minilang/content/ContentServices.xml" invoke="getSubContentWithPermCheck">
-        <description>Get Content and resource information</description>
-        <permission-service service-name="genericContentPermission" main-action="VIEW"/>
-        <attribute mode="IN" name="contentId" optional="false" type="String">
-            <type-validate>
-                <fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingContentId"/>
-            </type-validate>
-        </attribute>
-        <attribute mode="IN" name="contentAssocTypeId" optional="true" type="String"/>
-        <attribute mode="IN" name="mapKey" optional="true" type="String"/>
-        <attribute mode="IN" name="mainAction" optional="true" type="String"/>
-        <attribute mode="IN" name="contentOperationId" optional="true" type="String"/>
-        <attribute mode="IN" name="useCache" optional="true" type="Boolean"/>
-        <attribute mode="IN" name="filterByDate" optional="true" type="Boolean"/>
-        <attribute mode="OUT" name="subContentList" optional="true" type="java.util.List"/>
-    </service>
-
-    <service name="getSubSubContentWithPermCheck" engine="simple"  auth="true"
-            location="component://content/minilang/content/ContentServices.xml" invoke="getSubSubContentWithPermCheck">
-        <description>Get Content associated with Content</description>
-        <implements service="getSubContentWithPermCheck"/>
-        <attribute mode="IN" name="subContentAssocTypeId" optional="true" type="String"/>
-        <attribute mode="IN" name="subMapKey" optional="true" type="String"/>
-        <attribute mode="OUT" name="subSubContentList" optional="true" type="java.util.List"/>
-    </service>
-
     <service name="getContentAndDataResource" engine="simple" default-entity-name="Content" auth="true"
             location="component://content/minilang/content/ContentServices.xml" invoke="getContentAndDataResource">
         <description>Get Content and resource information</description>