Author: hansbak
Date: Sun Nov 26 03:43:20 2006 New Revision: 479348 URL: http://svn.apache.org/viewvc?view=rev&rev=479348 Log: reverting r478095 and instead creating a new service deleteCommunicationeventWorkEffort Modified: incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml incubator/ofbiz/trunk/applications/party/servicedef/services.xml Modified: incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?view=diff&rev=479348&r1=479347&r2=479348 ============================================================================== --- incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original) +++ incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Sun Nov 26 03:43:20 2006 @@ -17,8 +17,8 @@ --> <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd"> - <!-- xsi:noNamespaceSchemaLocation="../../../../../../../framework/minilang/dtd/simple-methods.xsd"--> + xsi:noNamespaceSchemaLocation="../../../../../../../framework/minilang/dtd/simple-methods.xsd"> + <!-- xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd"> --> <simple-method method-name="createCommunicationEvent" short-description="Create a CommunicationEvent"> <if> <condition> @@ -111,6 +111,16 @@ </if-compare> </iterate> </if-not-empty> + <!-- delete the event itself --> + <remove-value value-name="event"/> + </simple-method> + <simple-method method-name="deleteCommunicationEventWorkEffort" short-description="delete commEvent and workEffort"> + <check-permission permission="PARTYMGR" action="_CME_DELETE"> + <fail-property resource="PartyUiLabels" property="PartyUpdateCommunicationEventPermissionError"/> + </check-permission> + <check-errors/> + + <entity-one entity-name="CommunicationEvent" value-name="event"/> <!-- remove related workeffort when this is the only communicationevent connected to it --> <get-related value-name="event" relation-name="CommunicationEventWorkEff" list-name="workEffortComs"/> <if-not-empty field-name="workEffortComs"> @@ -123,13 +133,11 @@ <remove-related value-name="workEffort" relation-name="WorkEffortPartyAssignment"/> <remove-related value-name="workEffort" relation-name="WorkEffortStatus"/> <remove-value value-name="workEffort"/> - <set field="workEffortMessage" value="and worEffort [${workEffort.workEffortId}]"/> </if-empty> </iterate> </if-not-empty> <!-- delete the event itself --> - <remove-value value-name="event"/> - <set field="successMessage" value="Communication [${event.communicationEventId}] ${workEffortMessage} deleted "/> + <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 --> Modified: incubator/ofbiz/trunk/applications/party/servicedef/services.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/servicedef/services.xml?view=diff&rev=479348&r1=479347&r2=479348 ============================================================================== --- incubator/ofbiz/trunk/applications/party/servicedef/services.xml (original) +++ incubator/ofbiz/trunk/applications/party/servicedef/services.xml Sun Nov 26 03:43:20 2006 @@ -590,9 +590,15 @@ <auto-attributes entity-name="CommunicationEvent" include="nonpk" mode="IN" optional="true"/> </service> <service name="deleteCommunicationEvent" engine="simple" - location="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="deleteCommunicationEvent" auth="true"> + location="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="deleteCommunicationEvent" auth="true"> + <description>Delete a Communication Event, optionally delete the attached content and dataresource</description> + <auto-attributes entity-name="CommunicationEvent" include="pk" mode="IN" optional="false"/> + <attribute name="delContentDataResource" type="String" mode="IN" optional="true"/> + </service> + <service name="deleteCommunicationEventWorkEffort" engine="simple" + location="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="deleteCommunicationEventWorkEffort" auth="true"> <description>Delete a Communication Event, optionally delete the attached content and dataresource - and when this is the only communication event connected to a workeffort delete the workeffort too.</description> + and when this is the only communication event connected to a workeffort delete the workeffort too.</description> <auto-attributes entity-name="CommunicationEvent" include="pk" mode="IN" optional="false"/> <attribute name="delContentDataResource" type="String" mode="IN" optional="true"/> </service> |
Free forum by Nabble | Edit this page |