svn commit: r679702 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r679702 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml

ashish-18
Author: ashish
Date: Fri Jul 25 01:29:53 2008
New Revision: 679702

URL: http://svn.apache.org/viewvc?rev=679702&view=rev
Log:
No Functional Changes.
Converted TAB's to SPACES and improved the naming conventions.

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
    ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.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=679702&r1=679701&r2=679702&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 Jul 25 01:29:53 2008
@@ -80,46 +80,45 @@
         
         <!-- roles -->
         <!-- partyIdTo -->
- <if-not-empty field="newEntity.partyIdTo">
- <entity-one entity-name="PartyRole" value-name="partyRole">
+        <if-not-empty field="newEntity.partyIdTo">
+            <entity-one entity-name="PartyRole" value-name="partyRole">
                 <field-map field-name="partyId" value="${newEntity.partyIdTo}" />
- <field-map field-name="roleTypeId" value="ADDRESSEE" />
- </entity-one>
- <if-empty field="partyRole">
- <make-value entity-name="PartyRole" value-name="pr" />
- <set field="pr.partyId" value="${newEntity.partyIdTo}" />
- <set field="pr.roleTypeId" value="ADDRESSEE" />
- <create-value value-name="pr" />
- </if-empty>
- <make-value entity-name="CommunicationEventRole"
- value-name="commRole" />
- <set field="commRole.communicationEventId" from-field="newEntity.communicationEventId" />
- <set field="commRole.partyId" from-field="newEntity.partyIdTo" />
- <set field="commRole.roleTypeId" value="ADDRESSEE" />
+                <field-map field-name="roleTypeId" value="ADDRESSEE" />
+            </entity-one>
+            <if-empty field="partyRole">
+                <make-value entity-name="PartyRole" value-name="partyRole" />
+                <set field="partyRole.partyId" value="${newEntity.partyIdTo}" />
+                <set field="partyRole.roleTypeId" value="ADDRESSEE" />
+                <create-value value-name="partyRole" />
+            </if-empty>
+            <make-value entity-name="CommunicationEventRole" value-name="commRole" />
+            <set field="commRole.communicationEventId" from-field="newEntity.communicationEventId" />
+            <set field="commRole.partyId" from-field="newEntity.partyIdTo" />
+            <set field="commRole.roleTypeId" value="ADDRESSEE" />
             <set field="contactMechId" value="${newEntity.contactMechIdTo}" />
- <set field="commRole.statusId" value="COM_ROLE_CREATED" />
- <create-value value-name="commRole" />
- </if-not-empty>
+            <set field="commRole.statusId" value="COM_ROLE_CREATED" />
+            <create-value value-name="commRole" />
+        </if-not-empty>
 
         <!-- partyIdFrom -->
- <if-not-empty field="commEvent.partyIdFrom">
- <entity-one entity-name="PartyRole" value-name="partyRole">
- <field-map field-name="partyId" value="${newEntity.partyIdFrom}" />
- <field-map field-name="roleTypeId" value="ORIGINATOR" />
- </entity-one>
- <if-empty field="partyRole">
- <make-value entity-name="PartyRole" value-name="pr" />
- <set field="pr.partyId" value="${newEntity.partyIdFrom}" />
- <set field="pr.roleTypeId" value="ORIGINATOR" />
- <create-value value-name="pr" />
- </if-empty>
+        <if-not-empty field="commEvent.partyIdFrom">
+            <entity-one entity-name="PartyRole" value-name="partyRole">
+                <field-map field-name="partyId" value="${newEntity.partyIdFrom}" />
+                <field-map field-name="roleTypeId" value="ORIGINATOR" />
+            </entity-one>
+            <if-empty field="partyRole">
+                <make-value entity-name="PartyRole" value-name="partyRole" />
+                <set field="partyRole.partyId" value="${newEntity.partyIdFrom}" />
+                <set field="partyRole.roleTypeId" value="ORIGINATOR" />
+                <create-value value-name="partyRole" />
+            </if-empty>
             <set field="commRole.communicationEventId" from-field="newEntity.communicationEventId" />
- <set field="commRole.partyId" from-field="newEntity.partyIdFrom" />
- <set field="commRole.roleTypeId" value="ORIGINATOR" />
+            <set field="commRole.partyId" from-field="newEntity.partyIdFrom" />
+            <set field="commRole.roleTypeId" value="ORIGINATOR" />
             <set field="contactMechId" value="${newEntity.contactMechIdFrom}" />
- <set field="commRole.statusId" value="COM_ROLE_READ" />
- <create-value value-name="commRole" />
- </if-not-empty>
+            <set field="commRole.statusId" value="COM_ROLE_READ" />
+            <create-value value-name="commRole" />
+        </if-not-empty>
     </simple-method>
 
     <simple-method method-name="updateCommunicationEvent" short-description="Update a CommunicationEvent">

Modified: ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml?rev=679702&r1=679701&r2=679702&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml Fri Jul 25 01:29:53 2008
@@ -120,61 +120,58 @@
                 </else>
         </if-compare-field>
     </simple-method>
- <simple-method method-name="createCommunicationEventRoles"
- short-description="">
- <entity-condition list-name="commEvents" entity-name="CommunicationEvent" />
- <set field="count" value="0" type="Integer" />
- <iterate entry-name="commEvent" list-name="commEvents">
- <log level="always" message="====processing: ${commEvent.communicationEventId}"></log>
- <get-related value-name="commEvent" relation-name="CommunicationEventRole"
- list-name="roles" />
- <if-empty field="roles">
+    <simple-method method-name="createCommunicationEventRoles" short-description="">
+        <entity-condition list-name="commEvents" entity-name="CommunicationEvent" />
+        <set field="count" value="0" type="Integer" />
+        <iterate entry-name="commEvent" list-name="commEvents">
+            <log level="always" message="====processing: ${commEvent.communicationEventId}"></log>
+            <get-related value-name="commEvent" relation-name="CommunicationEventRole" list-name="roles" />
+            <if-empty field="roles">
                 <!--partyId To -->
- <if-not-empty field="commEvent.partyIdTo">
- <entity-one entity-name="PartyRole" value-name="partyRole">
- <field-map field-name="partyId" value="${commEvent.partyIdTo}" />
- <field-map field-name="roleTypeId" value="ADDRESSEE" />
- </entity-one>
- <if-empty field="partyRole">
- <make-value entity-name="PartyRole" value-name="pr" />
- <set field="pr.partyId" value="${commEvent.partyIdTo}" />
- <set field="pr.roleTypeId" value="ADDRESSEE" />
- <create-value value-name="pr" />
- </if-empty>
- <make-value entity-name="CommunicationEventRole"
- value-name="commRole" />
- <set field="commRole.communicationEventId" from-field="commEvent.communicationEventId" />
- <set field="commRole.partyId" from-field="commEvent.partyIdTo" />
- <set field="commRole.roleTypeId" value="ADDRESSEE" />
+                <if-not-empty field="commEvent.partyIdTo">
+                    <entity-one entity-name="PartyRole" value-name="partyRole">
+                        <field-map field-name="partyId" value="${commEvent.partyIdTo}" />
+                        <field-map field-name="roleTypeId" value="ADDRESSEE" />
+                    </entity-one>
+                    <if-empty field="partyRole">
+                        <make-value entity-name="PartyRole" value-name="partyRole" />
+                        <set field="partyRole.partyId" value="${commEvent.partyIdTo}" />
+                        <set field="partyRole.roleTypeId" value="ADDRESSEE" />
+                        <create-value value-name="partyRole" />
+                    </if-empty>
+                    <make-value entity-name="CommunicationEventRole" value-name="commRole" />
+                    <set field="commRole.communicationEventId" from-field="commEvent.communicationEventId" />
+                    <set field="commRole.partyId" from-field="commEvent.partyIdTo" />
+                    <set field="commRole.roleTypeId" value="ADDRESSEE" />
                     <set field="commRole.statusId" value="COM_ROLE_COMPLETED"/>
- <create-value value-name="commRole" />
- </if-not-empty>
+                    <create-value value-name="commRole" />
+                </if-not-empty>
 
                 <!-- partyIdFrom -->
- <if-not-empty field="commEvent.partyIdFrom">
- <entity-one entity-name="PartyRole" value-name="partyRole">
- <field-map field-name="partyId" value="${commEvent.partyIdFrom}" />
- <field-map field-name="roleTypeId" value="ORIGINATOR" />
- </entity-one>
- <if-empty field="partyRole">
- <make-value entity-name="PartyRole" value-name="pr" />
- <set field="pr.partyId" value="${commEvent.partyIdFrom}" />
- <set field="pr.roleTypeId" value="ORIGINATOR" />
- <create-value value-name="pr" />
- </if-empty>
+                <if-not-empty field="commEvent.partyIdFrom">
+                    <entity-one entity-name="PartyRole" value-name="partyRole">
+                        <field-map field-name="partyId" value="${commEvent.partyIdFrom}" />
+                        <field-map field-name="roleTypeId" value="ORIGINATOR" />
+                    </entity-one>
+                    <if-empty field="partyRole">
+                        <make-value entity-name="PartyRole" value-name="partyRole" />
+                        <set field="partyRole.partyId" value="${commEvent.partyIdFrom}" />
+                        <set field="partyRole.roleTypeId" value="ORIGINATOR" />
+                        <create-value value-name="partyRole" />
+                    </if-empty>
                     <set field="commRole.communicationEventId" from-field="commEvent.communicationEventId" />
- <set field="commRole.partyId" from-field="commEvent.partyIdFrom" />
- <set field="commRole.roleTypeId" value="ORIGINATOR" />
- <set field="commRole.statusId" value="COM_ROLE_COMPLETED"/>
- <create-value value-name="commRole" />
- </if-not-empty>
- <calculate field-name="count">
- <number value="1" />
- <calcop operator="add" field-name="count" />
- </calculate>
- </if-empty>
- </iterate>
- <log level="always" message="========${count} records updated" />
- </simple-method>
+                    <set field="commRole.partyId" from-field="commEvent.partyIdFrom" />
+                    <set field="commRole.roleTypeId" value="ORIGINATOR" />
+                    <set field="commRole.statusId" value="COM_ROLE_COMPLETED"/>
+                    <create-value value-name="commRole" />
+                </if-not-empty>
+                <calculate field-name="count">
+                    <number value="1" />
+                    <calcop operator="add" field-name="count" />
+                </calculate>
+            </if-empty>
+        </iterate>
+        <log level="always" message="========${count} records updated" />
+    </simple-method>
     
 </simple-methods>