You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2020/05/13 08:26:32 UTC
[ofbiz-framework] branch trunk updated: Improved: Converted
CustomTimePeriod related services from simple to entity-auto (OFBIZ-11689)
Thanks Pierre for reporting.
This is an automated email from the ASF dual-hosted git repository.
nmalin 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 ba04eda Improved: Converted CustomTimePeriod related services from simple to entity-auto (OFBIZ-11689) Thanks Pierre for reporting.
ba04eda is described below
commit ba04eda31a36db12bac6dd0f1607c91d31449e47
Author: Suraj Khurana <su...@hotwax.co>
AuthorDate: Sun May 10 16:20:27 2020 +0530
Improved: Converted CustomTimePeriod related services from simple to entity-auto
(OFBIZ-11689)
Thanks Pierre for reporting.
---
.../common/minilang/period/PeriodServices.xml | 62 ----------------------
framework/common/servicedef/services.xml | 12 ++---
2 files changed, 6 insertions(+), 68 deletions(-)
diff --git a/framework/common/minilang/period/PeriodServices.xml b/framework/common/minilang/period/PeriodServices.xml
deleted file mode 100644
index 5974c70..0000000
--- a/framework/common/minilang/period/PeriodServices.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method 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-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
- </check-permission>
- <check-errors/>
-
- <make-value entity-name="CustomTimePeriod" value-field="newEntity"/>
- <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-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
- </check-permission>
- <check-errors/>
-
- <make-value entity-name="CustomTimePeriod" value-field="lookupPKMap"/>
- <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-property resource="CommonUiLabels" property="CommonGenericPermissionError"/>
- </check-permission>
- <check-errors/>
-
- <make-value entity-name="CustomTimePeriod" value-field="lookupPKMap"/>
- <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-methods>
diff --git a/framework/common/servicedef/services.xml b/framework/common/servicedef/services.xml
index baac0de..737617e 100644
--- a/framework/common/servicedef/services.xml
+++ b/framework/common/servicedef/services.xml
@@ -160,9 +160,9 @@ under the License.
</service>
<!-- CustomTimePeriod Services -->
- <service name="createCustomTimePeriod" default-entity-name="CustomTimePeriod" engine="simple"
- location="component://common/minilang/period/PeriodServices.xml" invoke="createCustomTimePeriod" auth="true">
+ <service name="createCustomTimePeriod" default-entity-name="CustomTimePeriod" engine="entity-auto" invoke="create" auth="true">
<description>Create a CustomTimePeriod record</description>
+ <required-permissions join-type="AND"><check-permission permission="PERIOD_MAINT"/></required-permissions>
<auto-attributes mode="OUT" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<attribute name="organizationPartyId" type="String" mode="IN" optional="false"/><!-- FIXME: Framework dependency on Party component -->
@@ -170,15 +170,15 @@ under the License.
<override name="thruDate" optional="false"/>
<override name="periodTypeId" optional="false"/>
</service>
- <service name="updateCustomTimePeriod" default-entity-name="CustomTimePeriod" engine="simple"
- location="component://common/minilang/period/PeriodServices.xml" invoke="updateCustomTimePeriod" auth="true">
+ <service name="updateCustomTimePeriod" default-entity-name="CustomTimePeriod" engine="entity-auto" invoke="update" auth="true">
<description>Update a CustomTimePeriod record</description>
+ <required-permissions join-type="AND"><check-permission permission="PERIOD_MAINT"/></required-permissions>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
</service>
- <service name="deleteCustomTimePeriod" default-entity-name="CustomTimePeriod" engine="simple"
- location="component://common/minilang/period/PeriodServices.xml" invoke="deleteCustomTimePeriod" auth="true">
+ <service name="deleteCustomTimePeriod" default-entity-name="CustomTimePeriod" engine="entity-auto" invoke="delete" auth="true">
<description>Delete a CustomTimePeriod record</description>
+ <required-permissions join-type="AND"><check-permission permission="PERIOD_MAINT"/></required-permissions>
<auto-attributes mode="IN" include="pk" optional="false"/>
</service>