Author: deepak
Date: Sun Dec 16 12:29:49 2018 New Revision: 1849025 URL: http://svn.apache.org/viewvc?rev=1849025&view=rev Log: Improved: Convert updateContent and removeContent service to entity-auto (OFBIZ-10625) Thanks Aditya Sharma for reporting the issue. Modified: ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml Modified: ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml?rev=1849025&r1=1849024&r2=1849025&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/minilang/content/ContentServices.xml Sun Dec 16 12:29:49 2018 @@ -21,25 +21,6 @@ <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd"> - <!-- base content CRUD services --> - <simple-method method-name="updateContent" short-description="Update a Content Record"> - <entity-one entity-name="Content" value-field="content" auto-field-map="true"/> - <set-nonpk-fields map="parameters" value-field="content"/> - - <now-timestamp field="nowTimestamp"/> - <set field="content.lastModifiedByUserLogin" from-field="userLogin.userLoginId"/> - <set field="content.lastModifiedDate" from-field="nowTimestamp"/> - - <store-value value-field="content"/> - <field-to-result field="content.contentId" result-name="contentId"/> - </simple-method> - <simple-method method-name="removeContent" short-description="Remove a Content Record"> - <make-value entity-name="Content" value-field="lookupKeyValue"/> - <set-pk-fields map="parameters" value-field="lookupKeyValue"/> - <find-by-primary-key entity-name="Content" map="lookupKeyValue" value-field="content"/> - - <remove-value value-field="content"/> - </simple-method> <simple-method method-name="removeContentAndRelated" short-description="Remove a Content Record, related resource(s) and assocs."> <entity-one entity-name="Content" value-field="content"/> <if-not-empty field="content"> Modified: ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml?rev=1849025&r1=1849024&r2=1849025&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/servicedef/services_content.xml Sun Dec 16 12:29:49 2018 @@ -118,8 +118,7 @@ </service> <!-- update content services --> - <service name="updateContent" engine="simple" auth="true" - location="component://content/minilang/content/ContentServices.xml" invoke="updateContent"> + <service name="updateContent" engine="entity-auto" auth="true" invoke="update"> <description>Update a Content</description> <permission-service service-name="genericContentPermission" main-action="UPDATE"/> <implements service="updateContentAssoc" optional="true"/> @@ -146,8 +145,7 @@ </group> </service> - <service name="removeContent" default-entity-name="Content" engine="simple" - location="component://content/minilang/content/ContentServices.xml" invoke="removeContent" auth="true"> + <service name="removeContent" default-entity-name="Content" engine="entity-auto" invoke="delete" auth="true"> <description>Remove Content</description> <permission-service service-name="genericContentPermission" main-action="DELETE"/> <auto-attributes include="pk" mode="IN" optional="false"/> |
Free forum by Nabble | Edit this page |