| <?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" |
| xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd"> |
| <!-- ProductConfigItemContent --> |
| <simple-method method-name="createProductConfigItemContent" short-description="Create Content For ProductConfigItem"> |
| <make-value value-field="newEntity" entity-name="ProdConfItemContent"/> |
| <set-pk-fields map="parameters" value-field="newEntity"/> |
| <set-nonpk-fields map="parameters" value-field="newEntity"/> |
| |
| <if-empty field="newEntity.fromDate"> |
| <now-timestamp field="nowTimestamp"/> |
| <set field="newEntity.fromDate" from-field="nowTimestamp"/> |
| </if-empty> |
| |
| <create-value value-field="newEntity"/> |
| |
| <set-service-fields service-name="updateContent" map="parameters" to-map="updateContent"/> |
| <call-service service-name="updateContent" in-map-name="updateContent"/> |
| |
| <field-to-result field="newEntity.contentId" result-name="contentId"/> |
| <field-to-result field="newEntity.configItemId" result-name="configItemId"/> |
| <field-to-result field="newEntity.confItemContentTypeId" result-name="confItemContentTypeId"/> |
| </simple-method> |
| <simple-method method-name="updateProductConfigItemContent" short-description="Update Content For ProductConfigItem"> |
| <make-value value-field="lookupPKMap" entity-name="ProdConfItemContent"/> |
| <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"/> |
| |
| <set-service-fields service-name="updateContent" map="parameters" to-map="updateContent"/> |
| <call-service service-name="updateContent" in-map-name="updateContent"/> |
| </simple-method> |
| <simple-method method-name="removeProductConfigItemContent" short-description="Remove Content From ProductConfigItem"> |
| <make-value value-field="lookupPKMap" entity-name="ProdConfItemContent"/> |
| <set-pk-fields map="parameters" value-field="lookupPKMap"/> |
| <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/> |
| <remove-value value-field="lookedUpValue"/> |
| </simple-method> |
| |
| <!-- Specialized --> |
| <simple-method method-name="createSimpleTextContentForProductConfigItem" short-description="Create Simple Text Content For Product"> |
| <set-service-fields service-name="createProductConfigItemContent" map="parameters" to-map="createProductConfigItemContent"/> |
| <set-service-fields service-name="createSimpleTextContent" map="parameters" to-map="createSimpleText"/> |
| <call-service service-name="createSimpleTextContent" in-map-name="createSimpleText" break-on-error="true" > |
| <result-to-field result-name="contentId" field="createProductConfigItemContent.contentId"/> |
| </call-service> |
| <call-service service-name="createProductConfigItemContent" in-map-name="createProductConfigItemContent"/> |
| </simple-method> |
| <simple-method method-name="updateSimpleTextContentForProductConfigItem" short-description="Update Simple Text Content For Product"> |
| <set-service-fields service-name="updateProductConfigItemContent" map="parameters" to-map="updateProductConfigItemContent"/> |
| <call-service service-name="updateProductConfigItemContent" in-map-name="updateProductConfigItemContent"/> |
| <set-service-fields service-name="updateSimpleTextContent" map="parameters" to-map="updateSimpleText"/> |
| <call-service service-name="updateSimpleTextContent" in-map-name="updateSimpleText"/> |
| </simple-method> |
| |
| </simple-methods> |