You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2009/04/07 07:21:27 UTC

svn commit: r762624 - in /ofbiz/trunk: applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml framework/common/script/org/ofbiz/common/period/ framework/common/script/org/ofbiz/common/period/PeriodServices.xml

Author: jonesde
Date: Tue Apr  7 05:21:26 2009
New Revision: 762624

URL: http://svn.apache.org/viewvc?rev=762624&view=rev
Log:
Moved the CustomTimePeriod CrUD service impls back to framework/common, moved by mistake along with the find service before; thanks to CJ Horton for reporting this; related to OFBIZ-2275, though patch there is not used

Added:
    ofbiz/trunk/framework/common/script/org/ofbiz/common/period/
    ofbiz/trunk/framework/common/script/org/ofbiz/common/period/PeriodServices.xml
      - copied, changed from r762621, ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml
Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml?rev=762624&r1=762623&r2=762624&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml Tue Apr  7 05:21:26 2009
@@ -20,40 +20,6 @@
 
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
-    <!-- CustomTimePeriod Services -->
-    <simple-method method-name="createCustomTimePeriod" short-description="Create a CustomTimePeriod">
-        <check-permission permission="PERIOD_MAINT"><fail-message message="Security Error: to run createCustomTimePeriod you must have the PERIOD_MAINT permission"/></check-permission>
-        <check-errors/>
-
-        <make-value value-field="newEntity" entity-name="CustomTimePeriod"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        
-        <sequenced-id sequence-name="CustomTimePeriod" field="customTimePeriodId"/>
-        <set from-field="customTimePeriodId" field="newEntity.customTimePeriodId"/>
-        <field-to-result field="customTimePeriodId" result-name="customTimePeriodId"/>
-        
-        <create-value value-field="newEntity"/>
-    </simple-method>
-    <simple-method method-name="updateCustomTimePeriod" short-description="Update a CustomTimePeriod">
-        <check-permission permission="PERIOD_MAINT"><fail-message message="Security Error: to run updateCustomTimePeriod you must have the PERIOD_MAINT permission"/></check-permission>
-        <check-errors/>
-
-        <make-value value-field="lookupPKMap" entity-name="CustomTimePeriod"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
-    <simple-method method-name="deleteCustomTimePeriod" short-description="Delete a CustomTimePeriod">
-        <check-permission permission="PERIOD_MAINT"><fail-message message="Security Error: to run deleteCustomTimePeriod you must have the PERIOD_MAINT permission"/></check-permission>
-        <check-errors/>
-
-        <make-value value-field="lookupPKMap" entity-name="CustomTimePeriod"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
     <simple-method method-name="findCustomTimePeriods" short-description="Find a CustomTimePeriod">
         <if-not-empty field="parameters.organizationPartyId">
             <!-- walk up the tree and find all party groups that this is a member of, and include the periods for all of them -->

Copied: ofbiz/trunk/framework/common/script/org/ofbiz/common/period/PeriodServices.xml (from r762621, ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/period/PeriodServices.xml?p2=ofbiz/trunk/framework/common/script/org/ofbiz/common/period/PeriodServices.xml&p1=ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml&r1=762621&r2=762624&rev=762624&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/period/PeriodServices.xml Tue Apr  7 05:21:26 2009
@@ -53,58 +53,4 @@
         <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
-
-    <simple-method method-name="findCustomTimePeriods" short-description="Find a CustomTimePeriod">
-        <if-not-empty field="parameters.organizationPartyId">
-            <!-- walk up the tree and find all party groups that this is a member of, and include the periods for all of them -->
-            <set from-field="parameters.organizationPartyId" field="getParentOrganizationsCallMap.organizationPartyId"/>
-            <call-service service-name="getParentOrganizations" in-map-name="getParentOrganizationsCallMap">
-                <result-to-field result-name="parentOrganizationPartyIdList"/>
-            </call-service>
-            
-            <iterate entry="curOrganizationPartyId" list="parentOrganizationPartyIdList">
-                <clear-field field="orgTimePeriodList"/>
-                <entity-condition entity-name="CustomTimePeriod" list="orgTimePeriodList">
-                    <condition-list combine="and">
-                        <condition-list combine="or">
-                            <condition-expr field-name="organizationPartyId" operator="equals" from-field="curOrganizationPartyId"/>
-                        </condition-list>
-                        <condition-expr field-name="fromDate" operator="less-equals" from-field="parameters.findDate"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="thruDate" operator="greater-equals" from-field="parameters.findDate"/>
-                            <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
-                        </condition-list>
-                        <condition-expr field-name="periodTypeId" operator="in" from-field="parameters.onlyIncludePeriodTypeIdList" ignore-if-empty="true"/>
-                    </condition-list>
-                </entity-condition>
-                <list-to-list list="orgTimePeriodList" to-list="listSoFar"/>
-            </iterate>
-        </if-not-empty>
-        
-        <if-compare field="parameters.excludeNoOrganizationPeriods" operator="not-equals" value="Y">
-            <entity-condition entity-name="CustomTimePeriod" list="generalCustomTimePeriodList">
-                <condition-list combine="and">
-                    <condition-list combine="or">
-                        <condition-expr field-name="organizationPartyId" operator="equals" from-field="nullField"/>
-                        <condition-expr field-name="organizationPartyId" operator="equals" value="_NA_"/>
-                    </condition-list>
-                    <condition-expr field-name="fromDate" operator="less-equals" from-field="parameters.findDate"/>
-                    <condition-list combine="or">
-                        <condition-expr field-name="thruDate" operator="greater" from-field="parameters.findDate"/>
-                        <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
-                    </condition-list>
-                    <condition-expr field-name="periodTypeId" operator="in" from-field="parameters.onlyIncludePeriodTypeIdList" ignore-if-empty="true"/>
-                </condition-list>
-            </entity-condition>
-            <list-to-list list="generalCustomTimePeriodList" to-list="listSoFar"/>
-        </if-compare>
-        
-        <!--
-            * We might want to implement this sometime in the future, but for now is not needed 
-            * go through the list and check each one to see if it has a child in the list, if so don't copy it
-        <if-compare field="parameters.excludeParentPeriods" operator="equals" value="Y"></if-compare>
-        -->
-
-        <field-to-result field="listSoFar" result-name="customTimePeriodList"/>
-    </simple-method>
 </simple-methods>