This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 1a45f2f Improved: Converted WorkEffort related services from simple to entity-auto. (#135) 1a45f2f is described below commit 1a45f2ff71f13fc51c54969e23d492e441385e06 Author: Suraj Khurana <[hidden email]> AuthorDate: Sat May 16 10:17:32 2020 +0530 Improved: Converted WorkEffort related services from simple to entity-auto. (#135) (OFBIZ-11690) --- .../workeffort/WorkEffortSimpleServices.xml | 41 ---------------------- applications/workeffort/servicedef/services.xml | 21 +++++------ 2 files changed, 8 insertions(+), 54 deletions(-) diff --git a/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml b/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml index 67d18f5..7c47e60 100644 --- a/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml +++ b/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml @@ -803,29 +803,6 @@ under the License. <set from-field="workEffort.estimatedCompletionDate" field="newEntity.thruDate"/> <create-value value-field="newEntity"/> </simple-method> - - <!-- WorkEffort-FixedAsset --> - <simple-method method-name="createWorkEffortFixedAssetStd" - short-description="Create a WorkEffort FixedAsset Standard"> - <entity-one entity-name="WorkEffortFixedAssetStd" value-field="lookedUpValue"/> - <if-not-empty field="lookedUpValue"> - <add-error> - <fail-property resource="WorkEffortUiLabels" property="WorkEffortFixedAssetAlreadyExist"/> - </add-error> - <check-errors /> - <else> - <make-value entity-name="WorkEffortFixedAssetStd" value-field="newWEFixedAssetStd"/> - <set-pk-fields map="parameters" value-field="newWEFixedAssetStd"/> - <set-nonpk-fields map="parameters" value-field="newWEFixedAssetStd"/> - <create-value value-field="newWEFixedAssetStd"/> - </else> - </if-not-empty> - </simple-method> - <simple-method method-name="removeWorkEffortFixedAssetStd" - short-description="Delete a WorkEffort FixedAsset Standard"> - <entity-one entity-name="WorkEffortFixedAssetStd" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> <simple-method method-name="createWorkEffortFixedAssetAssign" short-description="Create a WorkEffort FixedAsset Assign"> <entity-one entity-name="WorkEffortFixedAssetAssign" value-field="lookedUpValue"/> @@ -853,12 +830,6 @@ under the License. </else> </if-not-empty> </simple-method> - <simple-method method-name="removeWorkEffortFixedAssetAssign" - short-description="Remove a WorkEffort FixedAsset Assign"> - <entity-one entity-name="WorkEffortFixedAssetAssign" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - <!-- Create/Update/Delete Work Effort Review--> <simple-method method-name="createWorkEffortReview" short-description="Create Work Effort Review"> <entity-one entity-name="WorkEffortReview" value-field="lookedUpValue"/> @@ -883,11 +854,6 @@ under the License. </else> </if-not-empty> </simple-method> - <simple-method method-name="deleteWorkEffortReview" - short-description="Remove a WorkEffort Review"> - <entity-one entity-name="WorkEffortReview" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> <simple-method method-name="indexWorkEffortKeywords" short-description="Index the Keywords for a WorkEffort" login-required="false"> <!-- this service is meant to be called from an entity ECA for entities that include a workEffortId @@ -931,13 +897,6 @@ under the License. </if-not-empty> <check-errors/> </simple-method> - - <simple-method method-name="deleteWorkEffortKeyword" - short-description="Remove a WorkEffort Keyword"> - <entity-one entity-name="WorkEffortKeyword" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="createWorkEffortKeywords" short-description="Create all Work Effort Keyword"> <set from-field="parameters.workEffortId" field="findWorkEffortMap.workEffortId"/> <find-by-primary-key entity-name="WorkEffort" map="findWorkEffortMap" value-field="workEffortInstance"/> diff --git a/applications/workeffort/servicedef/services.xml b/applications/workeffort/servicedef/services.xml index e16b708..b53ef01 100644 --- a/applications/workeffort/servicedef/services.xml +++ b/applications/workeffort/servicedef/services.xml @@ -992,10 +992,9 @@ under the License. </attribute> </service> <!-- WorkEffort-FixedAsset management services --> - <service name="createWorkEffortFixedAssetStd" engine="simple" auth="true" + <service name="createWorkEffortFixedAssetStd" engine="entity-auto" auth="true" default-entity-name="WorkEffortFixedAssetStd" - location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" - invoke="createWorkEffortFixedAssetStd"> + invoke="create"> <description>Creates a WorkEffortFixedAssetStd entry to associate a routing task with a fixed asset (type)</description> <permission-service service-name="workEffortManagerPermission" main-action="CREATE"/> @@ -1029,10 +1028,9 @@ under the License. </type-validate> </override> </service> - <service name="removeWorkEffortFixedAssetStd" engine="simple" auth="true" + <service name="removeWorkEffortFixedAssetStd" engine="entity-auto" auth="true" default-entity-name="WorkEffortFixedAssetStd" - location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" - invoke="removeWorkEffortFixedAssetStd"> + invoke="delete"> <description>Removes a WorkEffortFixedAssetStd, thus removing the association between a routing task and a fixed asset (type)</description> <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/> @@ -1091,10 +1089,9 @@ under the License. </type-validate> </override> </service> - <service name="removeWorkEffortFixedAssetAssign" engine="simple" auth="true" + <service name="removeWorkEffortFixedAssetAssign" engine="entity-auto" auth="true" default-entity-name="WorkEffortFixedAssetAssign" - location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" - invoke="removeWorkEffortFixedAssetAssign"> + invoke="delete"> <description>Remove a WorkEffortFixedAssign entry, which removes the association between a fixed asset and a work effort (e.g. a production run task)</description> <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/> @@ -1250,8 +1247,7 @@ under the License. </type-validate> </override> </service> - <service name="deleteWorkEffortReview" engine="simple" - location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="deleteWorkEffortReview" auth="true"> + <service name="deleteWorkEffortReview" engine="entity-auto" default-entity-name="WorkEffortReview" invoke="delete" auth="true"> <description>Remove a Work Effort Review</description> <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/> <auto-attributes entity-name="WorkEffortReview" include="pk" mode="IN" optional="false"/> @@ -1300,8 +1296,7 @@ under the License. </type-validate> </override> </service> - <service name="deleteWorkEffortKeyword" engine="simple" - location="component://workeffort/minilang/workeffort/WorkEffortSimpleServices.xml" invoke="deleteWorkEffortKeyword" auth="true"> + <service name="deleteWorkEffortKeyword" engine="entity-auto" default-entity-name="WorkEffortKeyword" invoke="delete" auth="true"> <description>Remove a Work Effort Keyword</description> <permission-service service-name="workEffortManagerPermission" main-action="DELETE"/> <auto-attributes entity-name="WorkEffortKeyword" include="pk" mode="IN" optional="false"/> |
Free forum by Nabble | Edit this page |