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 2008/03/04 10:27:52 UTC
svn commit: r633401 - in /ofbiz/trunk/applications/accounting:
script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
servicedef/services_fixedasset.xml
Author: jonesde
Date: Tue Mar 4 01:27:52 2008
New Revision: 633401
URL: http://svn.apache.org/viewvc?rev=633401&view=rev
Log:
Removed a bunch of services never really written, appear to be a copy/paste and search/replace only
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml?rev=633401&r1=633400&r2=633401&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml Tue Mar 4 01:27:52 2008
@@ -111,261 +111,7 @@
-->
-<!--!!!!!!!!!!!!!!!!!!!!!!!! from here and down the services are not tested. they are basically a copy of the category services -->
- <!-- ================================================================ -->
- <!-- FixedAssetRole Services -->
- <!-- ================================================================ -->
-
- <simple-method method-name="addPartyToFixedAsset" short-description="Add Party to FixedAsset">
- <set value="addPartyToFixedAsset" field="callingMethodName"/>
- <set value="CREATE" field="checkAction"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
- <make-value value-name="newEntity" entity-name="FixedAssetRole"/>
- <set-pk-fields map-name="parameters" value-name="newEntity"/>
- <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-
- <if-empty field-name="newEntity.fromDate">
- <now-timestamp-to-env env-name="newEntity.fromDate"/>
- </if-empty>
-
- <create-value value-name="newEntity"/>
- </simple-method>
- <simple-method method-name="updatePartyToFixedAsset" short-description="Update Party to FixedAsset Application">
- <set value="updatePartyToFixedAsset" field="callingMethodName"/>
- <set value="UPDATE" field="checkAction"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <entity-one entity-name="FixedAssetRole" value-name="lookedUpValue"/>
- <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
- <store-value value-name="lookedUpValue"/>
- </simple-method>
- <simple-method method-name="removePartyFromFixedAsset" short-description="Remove Party From FixedAsset">
- <set value="removePartyFromFixedAsset" field="callingMethodName"/>
- <set value="DELETE" field="checkAction"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <entity-one entity-name="FixedAssetRole" value-name="lookedUpValue"/>
- <remove-value value-name="lookedUpValue"/>
- </simple-method>
-
- <!-- ================================================================ -->
- <!-- FixedAssetRollup Services -->
- <!-- ================================================================ -->
-
- <simple-method method-name="addFixedAssetToFixedAsset" short-description="Add FixedAsset to FixedAsset">
- <set value="addFixedAssetToFixedAsset" field="callingMethodName"/>
- <set value="CREATE" field="checkAction"/>
- <!-- note the the user must be associated with the parent FixedAsset with the role limited permission -->
- <set value="parentFixedAssetId" field="fixedAssetIdName"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <make-value value-name="newEntity" entity-name="FixedAssetRollup"/>
- <set-pk-fields map-name="parameters" value-name="newEntity"/>
- <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-
- <if-empty field-name="newEntity.fromDate">
- <now-timestamp-to-env env-name="newEntity.fromDate"/>
- </if-empty>
-
- <create-value value-name="newEntity"/>
- </simple-method>
- <simple-method method-name="updateFixedAssetToFixedAsset" short-description="Update FixedAsset to FixedAsset Application">
- <set value="updateFixedAssetToFixedAsset" field="callingMethodName"/>
- <set value="UPDATE" field="checkAction"/>
- <!-- note the the user must be associated with the parent FixedAsset with the role limited permission -->
- <set value="parentFixedAssetId" field="fixedAssetIdName"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <entity-one entity-name="FixedAssetRollup" value-name="lookedUpValue"/>
- <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
- <store-value value-name="lookedUpValue"/>
- </simple-method>
- <simple-method method-name="removeFixedAssetFromFixedAsset" short-description="Remove FixedAsset From FixedAsset">
- <set value="removeFixedAssetFromFixedAsset" field="callingMethodName"/>
- <set value="DELETE" field="checkAction"/>
- <!-- note the the user must be associated with the parent FixedAsset with the role limited permission -->
- <set value="parentFixedAssetId" field="fixedAssetIdName"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <entity-one entity-name="FixedAssetRollup" value-name="lookedUpValue"/>
- <remove-value value-name="lookedUpValue"/>
- </simple-method>
-
- <!-- ================================================================ -->
- <!-- Special FixedAsset Function Services -->
- <!-- ================================================================ -->
-
- <simple-method method-name="copyFixedAssetProductMembers" short-description="copy FixedAssetProduct Members to a FixedAssetProductTo">
- <set value="copyFixedAssetProductMembers" field="callingMethodName"/>
- <set value="CREATE" field="checkAction"/>
- <!-- note the the user must be associated with the target FixedAsset with the role limited permission -->
- <set value="fixedAssetIdTo" field="fixedAssetIdName"/>
- <!-- TODO: Create the checkFixedAssetRelatedPermission simple method -->
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <entity-and entity-name="FixedAssetMember" list-name="fixedAssetMembers">
- <field-map field-name="fixedAssetId" env-name="parameters.fixedAssetId"/>
- </entity-and>
-
- <if-not-empty field-name="parameters.validDate">
- <filter-list-by-date list-name="fixedAssetMembers" valid-date-name="parameters.validDate"/>
- </if-not-empty>
-
- <!-- add each to a list to store and then store all and let the entity engine do inserts or updates as needed; much more reliable/useful -->
- <iterate entry-name="fixedAssetMember" list-name="fixedAssetMembers">
- <clone-value value-name="fixedAssetMember" new-value-name="newFixedAssetMember"/>
- <set from-field="parameters.fixedAssetIdTo" field="newFixedAssetMember.fixedAssetId"/>
- <set field="pcmsToStore[]" from-field="newFixedAssetMember"/>
- </iterate>
- <store-list list-name="pcmsToStore"/>
-
- <if-compare field-name="recurse" map-name="parameters" operator="equals" value="Y">
- <!-- call this service for each sub-FixedAsset in the rollup with the same FixedAssetIdTo -->
- <entity-and entity-name="FixedAssetRollup" list-name="fixedAssetRollups">
- <field-map field-name="parentFixedAssetId" env-name="parameters.fixedAssetId"/>
- </entity-and>
-
-
- <if-not-empty field-name="parameters.validDate">
- <filter-list-by-date list-name="fixedAssetRollups" valid-date-name="parameters.validDate"/>
- </if-not-empty>
-
- <iterate entry-name="fixedAssetRollup" list-name="fixedAssetRollups">
- <set from-field="fixedAssetRollup.fixedAssetId" field="callServiceMap.fixedAssetId"/>
- <set from-field="parameters.fixedAssetIdTo" field="callServiceMap.fixedAssetIdTo"/>
- <set from-field="parameters.validDate" field="callServiceMap.validDate"/>
- <set from-field="parameters.recurse" field="callServiceMap.recurse"/>
- <call-service service-name="copyFixedAssetProductMembers" in-map-name="callServiceMap"/>
- </iterate>
- </if-compare>
- </simple-method>
-
- <simple-method method-name="expireAllFixedAssetProductMembers" short-description="Remove FixedAsset From FixedAsset">
- <set value="expireAllFixedAssetProductMembers" field="callingMethodName"/>
- <set value="UPDATE" field="checkAction"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <if-not-empty field-name="thruDate" map-name="parameters">
- <set from-field="parameters.thruDate" field="expireTimestamp"/>
- <else>
- <now-timestamp-to-env env-name="expireTimestamp"/>
- </else>
- </if-not-empty>
-
- <entity-and entity-name="FixedAssetMember" list-name="fixedAssetMembers">
- <field-map field-name="fixedAssetId" env-name="parameters.fixedAssetId"/>
- </entity-and>
-
- <iterate entry-name="fixedAssetMember" list-name="fixedAssetMembers">
- <set from-field="expireTimestamp" field="fixedAssetMember.thruDate"/>
- <store-value value-name="fixedAssetMember"/>
- </iterate>
- </simple-method>
- <simple-method method-name="removeExpiredFixedAssetProductMembers" short-description="Remove FixedAsset From FixedAsset">
- <set value="removeExpiredFixedAssetProductMembers" field="callingMethodName"/>
- <set value="DELETE" field="checkAction"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <if-not-empty field-name="parameters.validDate">
- <set from-field="parameters.validDate" field="expireTimestamp"/>
- <else>
- <now-timestamp-to-env env-name="expireTimestamp"/>
- </else>
- </if-not-empty>
-
- <entity-and entity-name="FixedAssetMember" list-name="fixedAssetMembers">
- <field-map field-name="fixedAssetId" env-name="parameters.fixedAssetId"/>
- </entity-and>
-
- <iterate entry-name="fixedAssetMember" list-name="fixedAssetMembers">
- <if-compare-field field-name="thruDate" map-name="fixedAssetMember" operator="less" to-field-name="expireTimestamp" type="Timestamp">
- <remove-value value-name="fixedAssetMember"/>
- </if-compare-field>
- </iterate>
- </simple-method>
-
- <!-- ================================================================ -->
- <!-- Special FixedAsset Related Create Services -->
- <!-- ================================================================ -->
- <simple-method method-name="createProductInFixedAsset" short-description="Create a Product in a FixedAsset along with special information such as features">
- <set value="createProductInFixedAsset" field="callingMethodName"/>
- <set value="CREATE" field="checkAction"/>
- <call-simple-method method-name="checkFixedAssetRelatedPermission"/>
- <check-errors/>
-
- <if-empty field-name="parameters.currencyUomId">
- <!-- default to USD for lack of a better alternative, for now anyway... -->
- <set value="USD" field="parameters.currencyUomId"/>
- </if-empty>
-
- <!-- create Product -->
- <set-service-fields service-name="createProduct" map-name="parameters" to-map-name="callCreateProductMap"/>
- <if-empty field-name="callCreateProductMap.productTypeId">
- <set value="FINISHED_GOOD" field="callCreateProductMap.productTypeId"/>
- </if-empty>
- <call-service service-name="createProduct" in-map-name="callCreateProductMap">
- <result-to-field result-name="productId"/>
- </call-service>
- <field-to-result field-name="productId"/>
-
- <!-- create FixedAssetMember -->
- <set field="callCreateFixedAssetMemberMap.productId" from-field="productId"/>
- <set field="callCreateFixedAssetMemberMap.fixedAssetId" from-field="parameters.fixedAssetId"/>
- <call-service service-name="addProductToFixedAsset" in-map-name="callCreateFixedAssetMemberMap"/>
-
- <!-- create defaultPrice and averageCost ProductPrice -->
- <if-not-empty field-name="parameters.defaultPrice">
- <set from-field="productId" field="createDefaultPriceMap.productId"/>
- <set from-field="parameters.currencyUomId" field="createDefaultPriceMap.currencyUomId"/>
- <set from-field="parameters.defaultPrice" field="createDefaultPriceMap.price"/>
- <set value="_NA_" field="createDefaultPriceMap.productStoreGroupId"/>
- <set value="DEFAULT_PRICE" field="createDefaultPriceMap.productPriceTypeId"/>
- <call-service service-name="createProductPrice" in-map-name="createDefaultPriceMap"/>
- </if-not-empty>
-
- <if-not-empty field-name="parameters.averageCost">
- <set from-field="productId" field="createAverageCostMap.productId"/>
- <set from-field="parameters.currencyUomId" field="createAverageCostMap.currencyUomId"/>
- <set from-field="parameters.averageCost" field="createAverageCostMap.price"/>
- <set value="_NA_" field="createAverageCostMap.productStoreGroupId"/>
- <set value="AVERAGE_COST" field="createAverageCostMap.productPriceTypeId"/>
- <call-service service-name="createProductPrice" in-map-name="createAverageCostMap"/>
- </if-not-empty>
-
- <!-- create ProductFeatureAppl(s) -->
- <set value="N" field="hasSelectableFeatures"/>
- <iterate-map map-name="parameters.productFeatureIdByType" key-name="productFeatureTypeId" value-name="productFeatureId">
- <log level="info" message="Applying feature [${productFeatureId}] of type [${productFeatureTypeId}] to product [${productId}]"/>
- <set from-field="productId" field="createPfaMap.productId"/>
- <set from-field="productFeatureId" field="createPfaMap.productFeatureId"/>
- <if-compare field-name="${productFeatureTypeId}" map-name="parameters.productFeatureSelectableByType" operator="equals" value="Y">
- <set value="SELECTABLE_FEATURE" field="createPfaMap.productFeatureApplTypeId"/>
- <set value="Y" field="hasSelectableFeatures"/>
- <else>
- <set value="STANDARD_FEATURE" field="createPfaMap.productFeatureApplTypeId"/>
- </else>
- </if-compare>
- <call-service service-name="applyFeatureToProduct" in-map-name="createPfaMap"/>
- <clear-field field-name="createPfaMap"/>
- </iterate-map>
-
- <!-- set isVirtual based on hasSelectableFeatures -->
- <if-compare field-name="hasSelectableFeatures" operator="equals" value="Y">
- <entity-one entity-name="Product" value-name="newProduct"/>
- <set value="Y" field="newProduct.isVirtual"/>
- <store-value value-name="newProduct"/>
- </if-compare>
- </simple-method>
<!-- create a new FixedAssetStdCost -->
<simple-method method-name="createFixedAssetStdCost" short-description="Create a FixedAssetStdCost">
Modified: ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml?rev=633401&r1=633400&r2=633401&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_fixedasset.xml Tue Mar 4 01:27:52 2008
@@ -67,19 +67,6 @@
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
- <service name="createProductInFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createProductInFixedAsset" auth="true">
- <description>Create a Product for the Fixed Asset</description>
- <auto-attributes entity-name="FixedAsset" include="pk" mode="IN" optional="false"/>
- <auto-attributes entity-name="Product" include="pk" mode="INOUT" optional="true"/>
- <auto-attributes entity-name="Product" include="nonpk" mode="IN" optional="true"/>
- <attribute name="productFeatureIdByType" type="java.util.Map" mode="IN" optional="false" string-map-prefix="pft_"/>
- <attribute name="productFeatureSelectableByType" type="java.util.Map" mode="IN" optional="false" string-map-prefix="pftsel_"/>
- <attribute name="defaultPrice" type="Double" mode="IN" optional="true"/>
- <attribute name="averageCost" type="Double" mode="IN" optional="true"/>
- <attribute name="currencyUomId" type="String" mode="IN" optional="true"/>
- </service>
-
<!-- Fixed Asset calendar -->
<service name="updateFixedAssetCalendar" engine="simple"
location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetCalendar" auth="true">
@@ -88,66 +75,6 @@
<attribute name="exceptionDateStartTime" type="Timestamp" mode="IN" optional="false"/>
<attribute name="exceptionCapacity" type="Timestamp" mode="IN" optional="false"/>
<attribute name="capacity" type="Double" mode="IN" optional="true"/>
- </service>
- <!-- Party to Fixed Asset allocation -->
- <service name="addPartyToFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="addPartyToFixedAsset" auth="true">
- <description>Add Party To Fixed Asset</description>
- <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="partyId" type="String" mode="IN" optional="false"/>
- <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
- <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
- <attribute name="comments" type="String" mode="IN" optional="true"/>
- </service>
-
- <service name="updatePartyToFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updatePartyToFixedAsset" auth="true">
- <description>Update Party To Fixed Asset Information</description>
- <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="partyId" type="String" mode="IN" optional="false"/>
- <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
- <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
- <attribute name="comments" type="String" mode="IN" optional="true"/>
- </service>
-
- <service name="removePartyFromFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="removePartyFromFixedAsset" auth="true">
- <description>Remove Party From Fixed Asset</description>
- <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="partyId" type="String" mode="IN" optional="false"/>
- <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
- </service>
-
- <!-- Fixed Asset rollup services -->
- <service name="addFixedAssetToFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="addFixedAssetToFixedAsset" auth="true">
- <description>Add Fixed Asset To Fixed Asset</description>
- <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="parentFixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
- <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
- <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
- </service>
-
- <service name="updateFixedAssetToFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="updateFixedAssetToFixedAsset" auth="true">
- <description>Update Fixed Asset To Fixed Asset</description>
- <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="parentFixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
- <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
- <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
- </service>
-
- <service name="removeFixedAssetFromFixedAsset" engine="simple"
- location="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="removeFixedAssetFromFixedAsset" auth="true">
- <description>Remove Fixed Asset From Fixed Asset</description>
- <attribute name="fixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="parentFixedAssetId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
</service>
<!-- FixedAssetStdCost -->
<service name="createFixedAssetStdCost" default-entity-name="FixedAssetStdCost" engine="simple"