You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by su...@apache.org on 2020/05/05 05:37:20 UTC
[ofbiz-framework] branch trunk updated: Improved: Converted all
TechDataCalendarExcWeek related CRUD services from simple to entity-auto
(#104)
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 00e1b01 Improved: Converted all TechDataCalendarExcWeek related CRUD services from simple to entity-auto (#104)
00e1b01 is described below
commit 00e1b01a7dc4e9be8a0bcda860753665dee0fc7f
Author: Suraj Khurana <64...@users.noreply.github.com>
AuthorDate: Tue May 5 11:07:10 2020 +0530
Improved: Converted all TechDataCalendarExcWeek related CRUD services from simple to entity-auto (#104)
(OFBIZ-11636)
---
.../minilang/techdata/RoutingSimpleServices.xml | 41 ----------------------
.../manufacturing/servicedef/services_calendar.xml | 16 ++++-----
2 files changed, 8 insertions(+), 49 deletions(-)
diff --git a/applications/manufacturing/minilang/techdata/RoutingSimpleServices.xml b/applications/manufacturing/minilang/techdata/RoutingSimpleServices.xml
index d412a7d..a8a6933 100644
--- a/applications/manufacturing/minilang/techdata/RoutingSimpleServices.xml
+++ b/applications/manufacturing/minilang/techdata/RoutingSimpleServices.xml
@@ -144,45 +144,4 @@ under the License.
<remove-value value-field="lookedUpValue"/>
</if-not-empty>
</simple-method>
- <simple-method method-name="createCalendarExceptionWeek" short-description="Create Calendar Exception Week">
- <check-permission permission="MANUFACTURING" action="_CREATE"><fail-property resource="ManufacturingUiLabels" property="ManufacturingCalendarPermissionError"/></check-permission>
- <check-errors/>
- <make-value entity-name="TechDataCalendarExcWeek" value-field="lookupPKMap"/>
- <set-pk-fields map="parameters" value-field="lookupPKMap"/>
- <find-by-primary-key entity-name="TechDataCalendarExcWeek" map="lookupPKMap" value-field="newEntity"/>
- <if-not-empty field="newEntity.calendarId">
- <add-error>
- <fail-property resource="ManufacturingUiLabels" property="ManufacturingCalendarExceptionWeekIdAlreadyExist"/>
- </add-error>
- <check-errors/>
- <else>
- <make-value entity-name="TechDataCalendarExcWeek" value-field="newEntity"/>
- <set-pk-fields map="parameters" value-field="newEntity"/>
- <set-nonpk-fields map="parameters" value-field="newEntity"/>
- <create-value value-field="newEntity"/>
- </else>
- </if-not-empty>
- </simple-method>
-
- <simple-method method-name="updateCalendarExceptionWeek" short-description="Update Calendar Exception Week">
- <check-permission permission="MANUFACTURING" action="_UPDATE"><fail-property resource="ManufacturingUiLabels" property="ManufacturingCalendarPermissionError"/></check-permission>
- <check-errors/>
- <make-value entity-name="TechDataCalendarExcWeek" value-field="lookupPKMap"/>
- <set-pk-fields map="parameters" value-field="lookupPKMap"/>
- <find-by-primary-key entity-name="TechDataCalendarExcWeek" map="lookupPKMap" value-field="lookedUpValue"/>
- <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
- <store-value value-field="lookedUpValue"/>
- </simple-method>
-
- <simple-method method-name="removeCalendarExceptionWeek" short-description="Remove CalendarExceptionWeek">
- <check-permission permission="MANUFACTURING" action="_DELETE"><fail-property resource="ManufacturingUiLabels" property="ManufacturingCalendarPermissionError"/></check-permission>
- <check-errors/>
- <make-value entity-name="TechDataCalendarExcWeek" value-field="lookupPKMap"/>
- <set-pk-fields map="parameters" value-field="lookupPKMap"/>
- <find-by-primary-key entity-name="TechDataCalendarExcWeek" map="lookupPKMap" value-field="lookedUpValue"/>
- <if-not-empty field="lookedUpValue.calendarId">
- <remove-value value-field="lookedUpValue"/>
- </if-not-empty>
- </simple-method>
-
</simple-methods>
diff --git a/applications/manufacturing/servicedef/services_calendar.xml b/applications/manufacturing/servicedef/services_calendar.xml
index 8231835..d162a5c 100644
--- a/applications/manufacturing/servicedef/services_calendar.xml
+++ b/applications/manufacturing/servicedef/services_calendar.xml
@@ -80,26 +80,26 @@ under the License.
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
<service name="removeCalendarExceptionDay" engine="entity-auto" default-entity-name="TechDataCalendarExcDay" invoke="delete">
- <description>Update a calendar ExceptionDay</description>
+ <description>Delete a calendar ExceptionDay</description>
<permission-service service-name="manufacturingPermissionService" main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<!-- TechDataCalendarExcWeek services -->
- <service name="createCalendarExceptionWeek" engine="simple" default-entity-name="TechDataCalendarExcWeek"
- location="component://manufacturing/minilang/techdata/RoutingSimpleServices.xml" invoke="createCalendarExceptionWeek">
+ <service name="createCalendarExceptionWeek" engine="entity-auto" default-entity-name="TechDataCalendarExcWeek" invoke="create">
<description>Create a Calendar Exception Week</description>
+ <permission-service service-name="manufacturingPermissionService" main-action="CREATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="updateCalendarExceptionWeek" engine="simple" default-entity-name="TechDataCalendarExcWeek"
- location="component://manufacturing/minilang/techdata/RoutingSimpleServices.xml" invoke="updateCalendarExceptionWeek">
+ <service name="updateCalendarExceptionWeek" engine="entity-auto" default-entity-name="TechDataCalendarExcWeek" invoke="update">
<description>Update a Calendar Exception Week</description>
+ <permission-service service-name="manufacturingPermissionService" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
- <service name="removeCalendarExceptionWeek" engine="simple" default-entity-name="TechDataCalendarExcWeek"
- location="component://manufacturing/minilang/techdata/RoutingSimpleServices.xml" invoke="removeCalendarExceptionWeek">
- <description>Remove a Calendar Exception Week</description>
+ <service name="removeCalendarExceptionWeek" engine="entity-auto" default-entity-name="TechDataCalendarExcWeek" invoke="delete">
+ <description>Delete a Calendar Exception Week</description>
+ <permission-service service-name="manufacturingPermissionService" main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
</services>