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 2017/01/31 14:07:04 UTC

svn commit: r1781084 - in /ofbiz/trunk: applications/content/config/ContentEntityLabels.xml plugins/birt/data/BirtMasterData.xml plugins/birt/webapp/birt/WEB-INF/controller.xml

Author: jleroux
Date: Tue Jan 31 14:07:04 2017
New Revision: 1781084

URL: http://svn.apache.org/viewvc?rev=1781084&view=rev
Log:
Improved: Implement and demonstrate few services in Birt Report Builder
(OFBIZ-9192)

The Birt Report Builder can also use services. for now only the "rotation" 
report as been provided. We can provide more examples based on Fran�ois' 
work. 

Here are trivial changes
  fixes missing Lookup maps and view in controller for the "rotation" report 
  new needed labels
  typos fixed
  


Thanks:

Modified:
    ofbiz/trunk/applications/content/config/ContentEntityLabels.xml
    ofbiz/trunk/plugins/birt/data/BirtMasterData.xml
    ofbiz/trunk/plugins/birt/webapp/birt/WEB-INF/controller.xml

Modified: ofbiz/trunk/applications/content/config/ContentEntityLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentEntityLabels.xml?rev=1781084&r1=1781083&r2=1781084&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/config/ContentEntityLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentEntityLabels.xml Tue Jan 31 14:07:04 2017
@@ -65,6 +65,14 @@
         <value xml:lang="es">Unicode 8 bit</value>
         <value xml:lang="fr">Unicode 8 bit</value>
     </property>
+    <property key="Content.description.CTNT_MASTER_EXAMPLE">
+        <value xml:lang="en">Example</value>
+        <value xml:lang="fr">Exemple</value>
+    </property>
+    <property key="Content.description.CTNT_MASTER_TURNOVER">
+        <value xml:lang="en">Turnover (product)</value>
+        <value xml:lang="fr">Rotation (des stocks)</value>
+    </property>
     <property key="ContentAssocPredicate.description.categorizes">
         <value xml:lang="da">kategorier</value>
         <value xml:lang="de">kategorisiert</value>
@@ -3208,8 +3216,4 @@
         <value xml:lang="zh">发布点</value>
         <value xml:lang="zh-TW">發佈點</value>
     </property>
-    <property key="Content.description.CTNT_MASTER_EXAMPLE">
-        <value xml:lang="en">Example</value>
-        <value xml:lang="fr">Exemple</value>
-    </property>
 </resource>

Modified: ofbiz/trunk/plugins/birt/data/BirtMasterData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/birt/data/BirtMasterData.xml?rev=1781084&r1=1781083&r2=1781084&view=diff
==============================================================================
--- ofbiz/trunk/plugins/birt/data/BirtMasterData.xml (original)
+++ ofbiz/trunk/plugins/birt/data/BirtMasterData.xml Tue Jan 31 14:07:04 2017
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
--->
-<entity-engine-xml>
-    <DataResource dataResourceId="DR_MASTER_EXAMPLE" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />
-    <ElectronicText dataResourceId="DR_MASTER_EXAMPLE">
-        <textData><![CDATA[<!--default domain form-->
-<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">
-</form>]]>
-        </textData>
-    </ElectronicText>
-    <Content contentId="CTNT_MASTER_EXAMPLE" contentTypeId="REPORT_MASTER"  dataResourceId="DR_MASTER_EXAMPLE" statusId="CTNT_PUBLISHED" contentName="Example" description="Master Content for Example" />
-    <!-- Data retrieval will be done using perform find on entity Example-->
-    <ContentAttribute contentId="CTNT_MASTER_EXAMPLE" attrName="Entity" attrValue="Example"/>
-
-    <CustomMethod customMethodId="CM_FB_TURNOVER" customMethodTypeId="FLEXIBLE_BIRT" customMethodName="flexibleReportTurnOver" description="service to resolve invoice for turnover report domain"/>
-    <DataResource dataResourceId="DR_MASTER_TURNOVER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />
-    <ElectronicText dataResourceId="DR_MASTER_TURNOVER">
-        <textData><![CDATA[<!--default domain form-->
-<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">
-</form>]]>
-        </textData>
-    </ElectronicText>
-    <Content contentId="CTNT_MASTER_TURNOVER" customMethodId="CM_FB_TURNOVER" contentTypeId="REPORT_MASTER" dataResourceId="DR_MASTER_TURNOVER" statusId="CTNT_PUBLISHED" contentName="Turnover" description="Master Content for TURNOVER domain" />
-    <!-- Data retrieval will be done using two service call. First the contentAttribute Service give the service that will define which data and label will be retrieved,
-    and which filter and label are supported by the report design (default value will call the second service with "prepareField" suffix).
-    Second, the custom method give the service to retrieve all data in the report design.
-    Here : flexibleReportTurnOverPrepareFields (customMethodName + "prepareFields") then flexibleReportTurnOver-->
-    <ContentAttribute contentId="CTNT_MASTER_TURNOVER" attrName="Service" attrValue="default"/>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<entity-engine-xml>
+    <DataResource dataResourceId="DR_MASTER_EXAMPLE" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />
+    <ElectronicText dataResourceId="DR_MASTER_EXAMPLE">
+        <textData><![CDATA[<!--default domain form-->
+<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">
+</form>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="CTNT_MASTER_EXAMPLE" contentTypeId="REPORT_MASTER"  dataResourceId="DR_MASTER_EXAMPLE" statusId="CTNT_PUBLISHED" contentName="Example" description="Master Content for Example" />
+    <!-- Data retrieval will be done using perform find on entity Example-->
+    <ContentAttribute contentId="CTNT_MASTER_EXAMPLE" attrName="Entity" attrValue="Example"/>
+
+    <CustomMethod customMethodId="CM_FB_TURNOVER" customMethodTypeId="FLEXIBLE_BIRT" customMethodName="flexibleReportTurnOver" description="service to resolve invoice for turnover report domain"/>
+    <DataResource dataResourceId="DR_MASTER_TURNOVER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FORM_COMBINED" />
+    <ElectronicText dataResourceId="DR_MASTER_TURNOVER">
+        <textData><![CDATA[<!--default domain form-->
+<form name="${masterContentId}_${contentId}" type="single" extends="${masterContentId}" extends-resource="component://birt/widget/birt/BirtMasterForms.xml">
+</form>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="CTNT_MASTER_TURNOVER" customMethodId="CM_FB_TURNOVER" contentTypeId="REPORT_MASTER" dataResourceId="DR_MASTER_TURNOVER" statusId="CTNT_PUBLISHED" contentName="Turnover" description="Master Content for TURNOVER domain" />
+    <!-- Data retrieval will be done using two service calls. First the contentAttribute Service gives the service that will define which data and label will be retrieved,
+    and which filter and label are supported by the report design (default value will call the second service with "prepareField" suffix).
+    Second, the custom method gives the service to retrieve all data in the report design.
+    Here : flexibleReportTurnOverPrepareFields (customMethodName + "prepareFields") then flexibleReportTurnOver-->
+    <ContentAttribute contentId="CTNT_MASTER_TURNOVER" attrName="Service" attrValue="default"/>
+
 </entity-engine-xml>
\ No newline at end of file

Modified: ofbiz/trunk/plugins/birt/webapp/birt/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/birt/webapp/birt/WEB-INF/controller.xml?rev=1781084&r1=1781083&r2=1781084&view=diff
==============================================================================
--- ofbiz/trunk/plugins/birt/webapp/birt/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/plugins/birt/webapp/birt/WEB-INF/controller.xml Tue Jan 31 14:07:04 2017
@@ -136,6 +136,10 @@ under the License.
     </request-map>
     <!-- end of request mappings -->
 
+    <!-- ================ Entity Lookup Requests ================= -->
+    <request-map uri="LookupProductCategory"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductCategory"/></request-map>
+    <request-map uri="LookupProductStore"><security auth="true" https="true"/><response name="success" type="view" value="LookupProductStore"/></request-map>
+    
     <!-- View Mappings -->
     <view-map name="main" type="screen" page="component://birt/widget/birt/BirtScreens.xml#main"/>
     <view-map name="Report" type="screen" page="component://birt/widget/birt/BirtScreens.xml#Report"/>
@@ -168,5 +172,7 @@ under the License.
     <view-map name="PreviewReportSearchForm" type="screen" page="component://birt/widget/birt/BirtScreens.xml#PreviewReportSearchForm"/>
     <view-map name="ExecuteFlexibleReport" type="birt" />
     <view-map name="ViewBinaryDataResource" page="" type="simplecontent"/>
-    <!-- end of view mappings -->
+    
+    <view-map name="LookupProductCategory" type="screen" page="component://product/widget/catalog/LookupScreens.xml#LookupProductCategory"/>
+    <view-map name="LookupProductStore" type="screen" page="component://product/widget/catalog/LookupScreens.xml#LookupProductStore"/>
 </site-conf>