Author: deepak
Date: Mon Oct 17 15:35:40 2016
New Revision: 1765315

URL: http://svn.apache.org/viewvc?rev=1765315&view=rev
Log:
Improved: Convert CharacterSet entity related CRUD services from simple to 
entity-auto.
(OFBIZ-8355)(OFBIZ-8356)(OFBIZ-8357)

Thanks Pawan Verma for your contribution.

Modified:
    ofbiz/trunk/applications/content/minilang/data/DataServices.xml
    ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml

Modified: ofbiz/trunk/applications/content/minilang/data/DataServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/minilang/data/DataServices.xml?rev=1765315&r1=1765314&r2=1765315&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/minilang/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/minilang/data/DataServices.xml Mon Oct 17 
15:35:40 2016
@@ -176,28 +176,6 @@ under the License.
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
 
-    <!-- Methods for CharacterSet -->
-    <simple-method method-name="createCharacterSet" short-description="Create 
Character Set">
-        <make-value entity-name="CharacterSet" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-        <field-to-result result-name="characterSetId" 
field="newEntity.characterSetId"/>
-    </simple-method>
-    <simple-method method-name="updateCharacterSet" short-description="Update 
Character Set">
-        <make-value entity-name="CharacterSet" value-field="lookupKeyValue"/>
-        <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
-        <find-by-primary-key entity-name="CharacterSet" map="lookupKeyValue" 
value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
-    <simple-method method-name="removeCharacterSet" short-description="Remove 
Character Set">
-        <make-value entity-name="CharacterSet" value-field="lookupKeyValue"/>
-        <set-pk-fields map="parameters" value-field="lookupKeyValue"/>
-        <find-by-primary-key entity-name="CharacterSet" map="lookupKeyValue" 
value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
     <!-- Methods for ElectronicText -->
     <simple-method method-name="createElectronicText" 
short-description="Create Electronic Text">
         <make-value entity-name="ElectronicText" value-field="newEntity"/>

Modified: ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml?rev=1765315&r1=1765314&r2=1765315&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml 
(original)
+++ ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml Mon 
Oct 17 15:35:40 2016
@@ -113,22 +113,19 @@ under the License.
     </service>
 
     <!-- CharacterSet services -->
-    <service name="createCharacterSet" engine="simple" 
default-entity-name="CharacterSet" auth="true"
-            location="component://content/minilang/data/DataServices.xml" 
invoke="createCharacterSet">
+    <service name="createCharacterSet" engine="entity-auto" 
default-entity-name="CharacterSet" auth="true" invoke="create">
         <description>Create a CharacterSet</description>
         <permission-service service-name="contentManagerPermission" 
main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateCharacterSet" engine="simple" 
default-entity-name="CharacterSet" auth="true"
-            location="component://content/minilang/data/DataServices.xml" 
invoke="updateCharacterSet">
+    <service name="updateCharacterSet" engine="entity-auto" 
default-entity-name="CharacterSet" auth="true" invoke="update">
         <description>Update a CharacterSet</description>
         <permission-service service-name="contentManagerPermission" 
main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="removeCharacterSet" engine="simple" 
default-entity-name="CharacterSet" auth="true"
-            location="component://content/minilang/data/DataServices.xml" 
invoke="removeCharacterSet">
+    <service name="removeCharacterSet" engine="entity-auto" 
default-entity-name="CharacterSet" auth="true" invoke="delete">
         <description>Remove CharacterSet</description>
         <permission-service service-name="contentManagerPermission" 
main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>


Reply via email to