You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2020/03/04 13:35:22 UTC
[ofbiz-framework] branch trunk updated: Improved: Removes
getSubContentWithPermCheck and getSubSubContentWithPermCheck unused
services (OFBIZ-11393)(OFBIZ-11394)
This is an automated email from the ASF dual-hosted git repository.
jleroux 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 a3bcdc4 Improved: Removes getSubContentWithPermCheck and getSubSubContentWithPermCheck unused services (OFBIZ-11393)(OFBIZ-11394)
a3bcdc4 is described below
commit a3bcdc4cc39d9b3873db496c3e6a705bccef2efe
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed Mar 4 14:35:18 2020 +0100
Improved: Removes getSubContentWithPermCheck and getSubSubContentWithPermCheck
unused services
(OFBIZ-11393)(OFBIZ-11394)
They were introduced by Al Byers in 2007 and, like some other stuff done then
by Al, were never used. We can safely close the 2 related issues as won't do
after removing the 2 services and all the references to them.
Thanks: Priya Sharma
---
.../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 a68324f..4adf1bb 100644
--- a/applications/content/minilang/content/ContentServices.xml
+++ b/applications/content/minilang/content/ContentServices.xml
@@ -706,83 +706,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 ccc8129..19a8d9d 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>