Improved: Converted all TechDataCalendarExcWeek related CRUD services from simple to entity-auto (#104)
(OFBIZ-11636)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user