Author: nmalin
Date: Wed Nov 25 20:55:44 2015 New Revision: 1716542 URL: http://svn.apache.org/viewvc?rev=1716542&view=rev Log: convert createContentRole from simple to entity-auto. It's already linked to ensurePartyRole service, relate issue OFBIZ-6745 Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml ofbiz/trunk/applications/content/servicedef/services_content.xml Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=1716542&r1=1716541&r2=1716542&view=diff ============================================================================== --- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original) +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Wed Nov 25 20:55:44 2015 @@ -242,35 +242,7 @@ </simple-method> <!-- Methods for ContentRole --> - <simple-method method-name="createContentRole" short-description="Create Content Role"> - <if-empty field="parameters.fromDate"> - <now-timestamp field="parameters.fromDate"/> - </if-empty> - <make-value value-field="partyRolePK" entity-name="PartyRole"/> - <set-pk-fields value-field="partyRolePK" map="parameters"/> - <find-by-primary-key entity-name="PartyRole" map="partyRolePK" value-field="partyRole"/> - <if-empty field="partyRole"> - <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 entity-name="PartyRole" map="partyRolePK" value-field="partyRole"/> - <create-value value-field="partyRole"/> - </if-empty> - <check-errors/> - <make-value entity-name="ContentRole" value-field="newEntity"/> - <set-pk-fields map="parameters" value-field="newEntity"/> - <find-by-primary-key entity-name="ContentRole" map="newEntity" value-field="contentRole"/> - <if-empty field="contentRole"> - <set-nonpk-fields map="parameters" value-field="newEntity"/> - <create-value value-field="newEntity"/> - </if-empty> - <check-errors/> - </simple-method> <simple-method method-name="deactivateAllContentRoles" short-description="Update Content Role"> <make-value entity-name="ContentRole" value-field="lookupKeyValue"/> <set from-field="parameters.contentId" field="lookupKeyValue.contentId"/> Modified: ofbiz/trunk/applications/content/servicedef/services_content.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_content.xml?rev=1716542&r1=1716541&r2=1716542&view=diff ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services_content.xml (original) +++ ofbiz/trunk/applications/content/servicedef/services_content.xml Wed Nov 25 20:55:44 2015 @@ -303,8 +303,7 @@ </service> <!-- ContentRole services --> - <service name="createContentRole" engine="simple" default-entity-name="ContentRole" auth="true" - location="component://content/script/org/ofbiz/content/content/ContentServices.xml" invoke="createContentRole"> + <service name="createContentRole" engine="entity-auto" default-entity-name="ContentRole" auth="true" invoke="create"> <description>Create a ContentRole</description> <permission-service service-name="genericContentPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="false"/> |
Free forum by Nabble | Edit this page |