Author: nmalin
Date: Fri Jan 22 21:48:23 2016
New Revision: 1726323
URL: http://svn.apache.org/viewvc?rev=1726323&view=rev
Log:
I converted PartyContent and CommunicationEventPurpose from simple to
entity-auto engine, related issue OFBIZ-6850
Removed:
ofbiz/trunk/applications/party/script/org/ofbiz/party/content/
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
ofbiz/trunk/applications/party/servicedef/services.xml
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=1726323&r1=1726322&r2=1726323&view=diff
==============================================================================
---
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
(original)
+++
ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
Fri Jan 22 21:48:23 2016
@@ -413,19 +413,7 @@ under the License.
<!-- delete the event itself -->
<call-service service-name="deleteCommunicationEvent"
in-map-name="parameters"/>
</simple-method>
- <!-- since these ancillary operations on communication event cause them to
be updated,
- they will all use the CME_UPDATE permission -->
- <simple-method method-name="createCommunicationEventPurpose"
short-description="Create a CommunicationEventPurpose">
-
- <make-value value-field="newEntity"
entity-name="CommunicationEventPurpose"/>
- <set-pk-fields map="parameters" value-field="newEntity"/>
- <set-nonpk-fields map="parameters" value-field="newEntity"/>
- <create-value value-field="newEntity"/>
- </simple-method>
- <simple-method method-name="removeCommunicationEventPurpose"
short-description="Remove a CommunicationEventPurpose">
- <entity-one entity-name="CommunicationEventPurpose"
value-field="eventPurpose"/>
- <remove-value value-field="eventPurpose"/>
- </simple-method>
+
<simple-method method-name="createCommunicationEventRole"
short-description="Create a CommunicationEventRole">
<!-- check if role already exist, then ignore -->
@@ -445,7 +433,7 @@ under the License.
<if-empty field="newEntity.statusId">
<set field="newEntity.statusId" value="COM_ROLE_CREATED"/>
</if-empty>
-
+
<!-- if not provided get the latest contact mech id -->
<if-empty field="newEntity.contactMechId">
<entity-one entity-name="CommunicationEvent"
value-field="communicationEvent"/>
@@ -460,7 +448,6 @@ under the License.
<set field="newEntity.contactMechId"
from-field="contactMech.contactMechId"/>
</if-not-empty>
</if-empty>
-
<create-value value-field="newEntity"/>
</if-empty>
</simple-method>
@@ -487,7 +474,6 @@ under the License.
</if-not-empty>
</simple-method>
-
<simple-method method-name="sendEmailDated"
short-description="Checks for email communication events with the
status COM_IN_PROGRESS and a startdate which is expired, then send the email">
<now-timestamp field="nowDate"/>
@@ -537,12 +523,6 @@ under the License.
</iterate>
</simple-method>
- <simple-method method-name="createCustRequestCommEvent"
short-description="Create CustRequestCommEvent" >
- <make-value value-field="newEntity"
entity-name="CustRequestCommEvent"/>
- <set-pk-fields map="parameters" value-field="newEntity"/>
- <create-value value-field="newEntity"/>
- </simple-method>
-
<simple-method method-name="setCommunicationEventStatus"
short-description="Set The Communication Event Status">
<entity-one entity-name="CommunicationEvent"
value-field="communicationEvent"/>
<field-to-result field="communicationEvent.statusId"
result-name="oldStatusId"/>
@@ -647,18 +627,18 @@ under the License.
<entity-one entity-name="UserLogin" value-field="systemUserLogin"
auto-field-map="false">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
-
+
<set-service-fields
service-name="createCommunicationEventWithoutPermission" map="parameters"
to-map="contactUsMap"/>
<set field="contactUsMap.userLogin" from-field="systemUserLogin"/>
<call-service service-name="createCommunicationEventWithoutPermission"
in-map-name="contactUsMap"/>
-
+
<!-- Get party email address -->
<set field="getPartyEmailMap.partyId"
from-field="parameters.partyIdTo"/>
<set field="getPartyEmailMap.userLogin" from-field="systemUserLogin"/>
<call-service service-name="getPartyEmail"
in-map-name="getPartyEmailMap">
<result-to-field result-name="emailAddress"/>
</call-service>
-
+
<entity-one entity-name="ProductStoreEmailSetting"
value-field="productStoreEmailSetting"/>
<set field="bodyParameters.partyId" from-field="parameters.partyIdTo"/>
<set field="bodyParameters.email"
from-field="parameters.emailAddress"/>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=1726323&r1=1726322&r2=1726323&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Fri Jan 22 21:48:23
2016
@@ -795,24 +795,21 @@ under the License.
<auto-attributes entity-name="CommunicationEvent" include="pk"
mode="IN" optional="false"/>
<attribute name="delContentDataResource" type="String" mode="IN"
optional="true"/>
</service>
- <service name="createCommunicationEventPurpose" engine="simple"
-
location="component://party/script/org/ofbiz/party/communication/CommunicationEventServices.xml"
invoke="createCommunicationEventPurpose" auth="true">
+ <service name="createCommunicationEventPurpose"
default-entity-name="CommunicationEventPurpose" engine="entity-auto"
invoke="create" auth="true">
<description>Create a Communication Event Purpose</description>
<permission-service
service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/>
- <auto-attributes entity-name="CommunicationEventPurpose" include="pk"
mode="IN" optional="false"/>
- <auto-attributes entity-name="CommunicationEventPurpose"
include="nonpk" mode="IN" optional="true"/>
- </service>
- <service name="createCustRequestCommEvent" engine="simple"
-
location="component://party/script/org/ofbiz/party/communication/CommunicationEventServices.xml"
invoke="createCustRequestCommEvent" auth="true">
- <description>Create a CustRequestCommEvent</description>
- <permission-service
service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/>
- <auto-attributes entity-name="CustRequestCommEvent" include="pk"
mode="IN" optional="false"/>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="removeCommunicationEventPurpose" engine="simple"
-
location="component://party/script/org/ofbiz/party/communication/CommunicationEventServices.xml"
invoke="removeCommunicationEventPurpose" auth="true">
+ <service name="removeCommunicationEventPurpose"
default-entity-name="CommunicationEventPurpose" engine="entity-auto"
invoke="delete" auth="true">
<description>Remove a Communication Event Purpose</description>
<permission-service
service-name="partyCommunicationEventPermissionCheck" main-action="DELETE"/>
- <auto-attributes entity-name="CommunicationEventPurpose" include="pk"
mode="IN" optional="false"/>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ </service>
+ <service name="createCustRequestCommEvent"
default-entity-name="CustRequestCommEvent" engine="entity-auto" invoke="create"
auth="true">
+ <description>Create a CustRequestCommEvent</description>
+ <permission-service
service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<service name="createCommunicationEventRoleInterface" engine="interface"
location="" invoke="">
<description>Create a Communication Event Role with or w/o permission
check</description>
@@ -929,49 +926,18 @@ under the License.
<!-- party content services -->
- <!-- old services
- <service name="createPartyContent" engine="simple"
default-entity-name="Content"
-
location="component://party/script/org/ofbiz/party/party/PartyServices.xml"
invoke="createPartyContent" auth="false">
- <description>Create Party Associated Content</description>
- <auto-attributes include="nonpk" mode="IN" optional="true"/>
- <attribute name="uploadedFile" type="java.nio.ByteBuffer" mode="IN"
optional="true"/>
- <attribute name="_uploadedFile_fileName" type="String" mode="IN"
optional="true"/>
- <attribute name="_uploadedFile_contentType" type="String" mode="IN"
optional="false"/>
- <attribute name="dataCategoryId" type="String" mode="IN"
optional="true"/>
- <attribute name="statusId" type="String" mode="IN" optional="false"/>
- <attribute name="partyId" type="String" mode="IN" optional="true"/>
- <attribute name="contentId" type="String" mode="OUT" optional="false"/>
- <override name="contentTypeId" optional="false"/>
- </service>
- <service name="updatePartyContent" engine="simple"
default-entity-name="Content"
-
location="component://party/script/org/ofbiz/party/party/PartyServices.xml"
invoke="updatePartyContent" auth="false">
- <description>Update a Party Content</description>
- <auto-attributes include="pk" mode="INOUT" optional="false"/>
- <auto-attributes include="nonpk" mode="IN" optional="true"/>
- <attribute name="uploadedFile" type="java.nio.ByteBuffer" mode="IN"
optional="true"/>
- <attribute name="_uploadedFile_fileName" type="String" mode="IN"
optional="true"/>
- <attribute name="_uploadedFile_contentType" type="String" mode="IN"
optional="false"/>
- <attribute mode="IN" name="partyId" optional="true" type="String"/>
- <attribute mode="IN" name="dataCategoryId" optional="true"
type="String"/>
- </service>
- -->
- <service name="createPartyContent" engine="simple"
default-entity-name="PartyContent"
-
location="component://party/script/org/ofbiz/party/content/PartyContentServices.xml"
invoke="createPartyContent" auth="true">
+ <service name="createPartyContent" default-entity-name="PartyContent"
engine="entity-auto" invoke="create" auth="true">
<description>Create a PartyContent record</description>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="fromDate" optional="true"/>
</service>
-
- <service name="updatePartyContent" engine="simple"
default-entity-name="PartyContent"
-
location="component://party/script/org/ofbiz/party/content/PartyContentServices.xml"
invoke="updatePartyContent" auth="true">
+ <service name="updatePartyContent" default-entity-name="PartyContent"
engine="entity-auto" invoke="update" auth="true">
<description>Update a PartyContent record</description>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
</service>
-
- <service name="removePartyContent" engine="simple"
default-entity-name="PartyContent"
-
location="component://party/script/org/ofbiz/party/content/PartyContentServices.xml"
invoke="removePartyContent" auth="true">
+ <service name="removePartyContent" default-entity-name="PartyContent"
engine="entity-auto" invoke="delete" auth="true">
<description>Remove a PartyContent record</description>
<auto-attributes mode="IN" include="pk" optional="false"/>
</service>