Moving service definition and implementation to appropriate place - part of jira issue OFBIZ-2887.

Thanks Parimal for the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@810078 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ashish Vijaywargiya
2009-09-01 14:45:50 +00:00
parent fe0c90452e
commit b2dd527c06
6 changed files with 47 additions and 45 deletions
@@ -37,4 +37,35 @@ under the License.
</if-empty>
</iterate>
</simple-method>
<simple-method method-name="migrateStatusToFinAccountTrans" short-description="Migrate statusId to FinAccountTrans entity">
<entity-condition entity-name="FinAccountTrans" list="finAccountTransList">
<use-iterator/>
</entity-condition>
<iterate list="finAccountTransList" entry="finAccountTrans">
<if-empty field="finAccountTrans.statusId">
<set field="finAccountTrans.statusId" value="FINACT_TRNS_APPROVED"/>
<store-value value-field="finAccountTrans"/>
</if-empty>
</iterate>
</simple-method>
<simple-method method-name="migrateFixedAssetMaintMeter" short-description="Copy FixedAssetMaintMeter To FixedAssetMeter">
<entity-condition list="maintMeterList" entity-name="FixedAssetMaintMeter"/>
<iterate list="maintMeterList" entry="maintMeter">
<make-value value-field="newEntity" entity-name="FixedAssetMeter"/>
<set-pk-fields map="maintMeter" value-field="newEntity"/>
<set-nonpk-fields map="maintMeter" value-field="newEntity"/>
<set field="newEntity.readingDate" from-field="maintMeter.createdStamp"/>
<entity-one entity-name="FixedAssetMeter" value-field="lookedUpValue" auto-field-map="false">
<field-map field-name="fixedAssetId" from-field="newEntity.fixedAssetId"/>
<field-map field-name="productMeterTypeId" from-field="newEntity.productMeterTypeId"/>
<field-map field-name="readingDate" from-field="newEntity.readingDate"/>
</entity-one>
<if-empty field="lookedUpValue">
<create-value value-field="newEntity"/>
<check-errors/>
</if-empty>
</iterate>
</simple-method>
</simple-methods>
@@ -371,18 +371,6 @@ under the License.
<remove-value value-field="lookedUpValue"/>
</simple-method>
<simple-method method-name="migrateStatusToFinAccountTrans" short-description="Migrate statusId to FinAccountTrans entity">
<entity-condition entity-name="FinAccountTrans" list="finAccountTransList">
<use-iterator/>
</entity-condition>
<iterate list="finAccountTransList" entry="finAccountTrans">
<if-empty field="finAccountTrans.statusId">
<set field="finAccountTrans.statusId" value="FINACT_TRNS_APPROVED"/>
<store-value value-field="finAccountTrans"/>
</if-empty>
</iterate>
</simple-method>
<simple-method method-name="depositWithdrawPayments" short-description="Deposit withdraw payments">
<set field="paymentIds" from-field="parameters.paymentIds"/>
<set field="finAccountId" from-field="parameters.finAccountId"/>
@@ -453,24 +453,6 @@ under the License.
</iterate>
</iterate>
</simple-method>
<simple-method method-name="migrateFixedAssetMaintMeter" short-description="Copy FixedAssetMaintMeter To FixedAssetMeter">
<entity-condition list="maintMeterList" entity-name="FixedAssetMaintMeter"/>
<iterate list="maintMeterList" entry="maintMeter">
<make-value value-field="newEntity" entity-name="FixedAssetMeter"/>
<set-pk-fields map="maintMeter" value-field="newEntity"/>
<set-nonpk-fields map="maintMeter" value-field="newEntity"/>
<set field="newEntity.readingDate" from-field="maintMeter.createdStamp"/>
<entity-one entity-name="FixedAssetMeter" value-field="lookedUpValue" auto-field-map="false">
<field-map field-name="fixedAssetId" from-field="newEntity.fixedAssetId"/>
<field-map field-name="productMeterTypeId" from-field="newEntity.productMeterTypeId"/>
<field-map field-name="readingDate" from-field="newEntity.readingDate"/>
</entity-one>
<if-empty field="lookedUpValue">
<create-value value-field="newEntity"/>
<check-errors/>
</if-empty>
</iterate>
</simple-method>
<!-- create/update/delete FixedAssetMaintOrder -->
<simple-method method-name="createFixedAssetMaintOrder" short-description="Create a FixedAsset Maintenance Order">
@@ -447,16 +447,6 @@ under the License.
<implements service="permissionInterface"/>
</service>
<service name="migrateStatusToFinAccountTrans" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="migrateStatusToFinAccountTrans">
<description>
Migrate statusId to FinAccountTrans entity,
this service can be used to upgrade existing data i.e it sets the statusId(new field in entity) to "Approved" if found empty.
Before running this service, load the seed data for StatusType and StatusItem from the file :
accounting/data/AccountingTypeData.xml
</description>
</service>
<service name="depositWithdrawPayments" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="depositWithdrawPayments">
<description>Deposit withdraw payments</description>
@@ -198,11 +198,6 @@ under the License.
<permission-service service-name="fixedAssetPermissionCheck" main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<service name="migrateFixedAssetMaintMeter" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="migrateFixedAssetMaintMeter" auth="true">
<description>Copy the FixedAssetMaintMeter entity to FixedAssetMeter. FixedAssetMeter.readingDate will be replaced with FixedAssetMaintMeter.createdStamp.</description>
<permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
</service>
<!-- FixedAsset Maintenance Order Create/Update/Delete-->
<service name="createFixedAssetMaintOrder" default-entity-name="FixedAssetMaintOrder" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/fixedasset/FixedAssetServices.xml" invoke="createFixedAssetMaintOrder" auth="true">
@@ -32,4 +32,20 @@ under the License.
accounting/data/AccountingTypeData.xml
</description>
</service>
<service name="migrateStatusToFinAccountTrans" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/UpgradeServices.xml" invoke="migrateStatusToFinAccountTrans">
<description>
Migrate statusId to FinAccountTrans entity,
this service can be used to upgrade existing data i.e it sets the statusId(new field in entity) to "Approved" if found empty.
Before running this service, load the seed data for StatusType and StatusItem from the file :
accounting/data/AccountingTypeData.xml
</description>
</service>
<service name="migrateFixedAssetMaintMeter" engine="simple"
location="component://accounting/script/org/ofbiz/accounting/UpgradeServices.xml" invoke="migrateFixedAssetMaintMeter" auth="true">
<description>Copy the FixedAssetMaintMeter entity to FixedAssetMeter. FixedAssetMeter.readingDate will be replaced with FixedAssetMaintMeter.createdStamp.</description>
<permission-service service-name="fixedAssetPermissionCheck" main-action="CREATE"/>
</service>
</services>