You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2017/04/22 08:38:34 UTC

svn commit: r1792273 - in /ofbiz/branches/release16.11: ./ applications/order/minilang/quote/QuoteServices.xml applications/order/servicedef/services_quote.xml

Author: deepak
Date: Sat Apr 22 08:38:34 2017
New Revision: 1792273

URL: http://svn.apache.org/viewvc?rev=1792273&view=rev
Log:
Applied fix from trunk for revision: 1792270 
===

Improved: Converted create and remove QuoteRole service to entity-auto also added update and expire QuoteRole service.(OFBIZ-9331)

Modified:
    ofbiz/branches/release16.11/   (props changed)
    ofbiz/branches/release16.11/applications/order/minilang/quote/QuoteServices.xml
    ofbiz/branches/release16.11/applications/order/servicedef/services_quote.xml

Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Apr 22 08:38:34 2017
@@ -10,5 +10,5 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804
+/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270
 /ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520

Modified: ofbiz/branches/release16.11/applications/order/minilang/quote/QuoteServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/minilang/quote/QuoteServices.xml?rev=1792273&r1=1792272&r2=1792273&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/order/minilang/quote/QuoteServices.xml (original)
+++ ofbiz/branches/release16.11/applications/order/minilang/quote/QuoteServices.xml Sat Apr 22 08:38:34 2017
@@ -281,47 +281,6 @@ under the License.
         <check-errors/>
     </simple-method>
 
-    <!-- create a new QuoteRole -->
-    <simple-method method-name="createQuoteRole" short-description="Create a QuoteRole">
-        <check-permission permission="ORDERMGR" action="_CREATE">
-            <fail-property resource="OrderErrorUiLabels" property="OrderErrorCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
-        <set from-field="parameters.partyId" field="lookupPKMap.partyId"/>
-        <set from-field="parameters.roleTypeId" field="lookupPKMap.roleTypeId"/>
-        <find-by-primary-key entity-name="PartyRole" map="lookupPKMap" value-field="partyRole"/>
-        <if-empty field="partyRole.partyId">
-            <check-permission permission="PARTYMGR" action="_CREATE">
-                <fail-property resource="OrderErrorUiLabels" property="OrderErrorCreatePermissionError"/>
-            </check-permission>
-            <check-permission permission="PARTYMGR" action="_UPDATE">
-                <fail-property resource="OrderErrorUiLabels" property="OrderErrorCreatePermissionError"/>
-            </check-permission>
-            <check-errors/>
-            <make-value value-field="partyRole" entity-name="PartyRole"/>
-            <set-pk-fields map="lookupPKMap" value-field="partyRole"/>
-            <create-value value-field="partyRole"/>
-        </if-empty>
-        <!-- create new entity and create all the fields -->
-        <make-value value-field="newEntity" entity-name="QuoteRole"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-        <property-to-field resource="OrderUiLabels" property="OrderOrderQuoteRoleAddedSuccessfully" field="successMessage"/>
-        <check-errors/>
-    </simple-method>
-
-    <!-- remove an existing QuoteRole -->
-    <simple-method method-name="removeQuoteRole" short-description="Remove an existing QuoteRole">
-        <check-permission permission="ORDERMGR" action="_DELETE">
-            <fail-property resource="OrderErrorUiLabels" property="OrderErrorDeletePermissionError"/>
-        </check-permission>
-        <check-errors/>
-        <entity-one entity-name="QuoteRole" value-field="quoteRole" auto-field-map="true"/>
-        <check-errors/>
-        <remove-value value-field="quoteRole"/>
-        <check-errors/>
-    </simple-method>
-
     <!-- create a new QuoteItem -->
     <simple-method method-name="createQuoteItem" short-description="Create a QuoteItem">
         <entity-one entity-name="Quote" value-field="quote" auto-field-map="true"/>

Modified: ofbiz/branches/release16.11/applications/order/servicedef/services_quote.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/servicedef/services_quote.xml?rev=1792273&r1=1792272&r2=1792273&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/order/servicedef/services_quote.xml (original)
+++ ofbiz/branches/release16.11/applications/order/servicedef/services_quote.xml Sat Apr 22 08:38:34 2017
@@ -69,16 +69,37 @@ under the License.
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- QuoteRole  -->
-    <service name="createQuoteRole" default-entity-name="QuoteRole" engine="simple"
-                location="component://order/minilang/quote/QuoteServices.xml" invoke="createQuoteRole" auth="true">
+    <service name="createQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="create" auth="true">
         <description>Create a QuoteRole</description>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <required-permissions join-type="AND">
+            <check-permission permission="ORDERMGR" action="_CREATE"/>
+        </required-permissions>
+        <auto-attributes mode="IN" include="pk" />
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+        <!-- make fromDate as optional for backward compatibility, EntityAuto engine automatically set the fromDate to nowTimestamp if its not missing-->
+        <override name="fromDate" mode="IN" optional="true"/>
     </service>
-    <service name="removeQuoteRole" default-entity-name="QuoteRole" engine="simple"
-                location="component://order/minilang/quote/QuoteServices.xml" invoke="removeQuoteRole" auth="true">
+    <service name="updateQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="update" auth="true">
+        <description>Update a QuoteRole</description>
+        <required-permissions join-type="AND">
+            <check-permission permission="ORDERMGR" action="_UPDATE"/>
+        </required-permissions>
+        <auto-attributes mode="IN" include="pk" />
+        <auto-attributes mode="IN" include="nonpk" optional="true"/>
+    </service>
+    <service name="removeQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="delete" auth="true">
         <description>Remove a QuoteRole</description>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
-        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <required-permissions join-type="AND">
+            <check-permission permission="ORDERMGR" action="_DELETE"/>
+        </required-permissions>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
+    <service name="expireQuoteRole" default-entity-name="QuoteRole" engine="entity-auto" invoke="expire" auth="true">
+        <description>Expire a QuoteRole</description>
+        <required-permissions join-type="AND">
+            <check-permission permission="ORDERMGR" action="_UPDATE"/>
+        </required-permissions>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <!-- QuoteItem  -->
     <service name="createQuoteItem" default-entity-name="QuoteItem" engine="simple"