Improved: Convert createContactList service from simple to entity-auto (OFBIZ-9585)

thanks to Suraj Khurana for this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825296 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nicolas Malin
2018-02-25 09:21:45 +00:00
parent c46c18e706
commit 9ea367ab4c
2 changed files with 1 additions and 18 deletions
@@ -20,20 +20,6 @@ under the License.
<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">
<!-- ContactList methods -->
<simple-method method-name="createContactList" short-description="Create an ContactList">
<make-value entity-name="ContactList" value-field="newEntity"/>
<if-empty field="parameters.contactListId">
<sequenced-id sequence-name="ContactList" field="newEntity.contactListId"/>
<else>
<set field="newEntity.contactListId" from-field="parameters.contactListId"/>
</else>
</if-empty>
<field-to-result field="newEntity.contactListId" result-name="contactListId"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<create-value value-field="newEntity"/>
</simple-method>
<!-- ContactListParty methods -->
<simple-method method-name="inlineCheckContactListMechType" short-description="inlineCheckContactListMechType">
<!-- check the preferredContactMechId, make sure it is the right type -->
@@ -158,14 +158,11 @@ under the License.
</service>
<!-- ContactList Services -->
<service name="createContactList" default-entity-name="ContactList" engine="simple"
location="component://marketing/minilang/marketing/contact/ContactListServices.xml" invoke="createContactList" auth="true">
<service name="createContactList" default-entity-name="ContactList" engine="entity-auto" invoke="create" auth="true">
<description>Create a ContactList record</description>
<permission-service service-name="marketingPermissionService" main-action="CREATE"/>
<auto-attributes include="pk" mode="INOUT" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="contactListTypeId" optional="false"/>
<override name="contactListName" optional="false"/>
</service>
<service name="updateContactList" default-entity-name="ContactList" engine="entity-auto" invoke="update" auth="true">
<description>Update a ContactList record</description>