<?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.
-->

<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
    <description>Product Component Services</description>
    <vendor>OFBiz</vendor>
    <version>1.0</version>

    <!-- ======================================== -->
    <!-- Product Services -->
    <!-- ======================================== -->
    <service name="interfaceProduct" default-entity-name="Product" engine="interface" location="" invoke="">
        <auto-attributes include="nonpk" mode="IN" optional="true">
            <exclude field-name="createdDate"/>
            <exclude field-name="createdByUserLogin"/>
            <exclude field-name="lastModifiedDate"/>
            <exclude field-name="lastModifiedByUserLogin"/>
        </auto-attributes>
        <override name="description" allow-html="safe"/>
        <override name="longDescription" allow-html="safe"/>
    </service>
    <service name="createProduct" default-entity-name="Product" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="createProduct" auth="true">
        <description>Create a Product</description>
        <implements service="interfaceProduct"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
        <override name="productTypeId" optional="false"/>
        <override name="internalName" optional="false"/>
    </service>
    <service name="updateProduct" default-entity-name="Product" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="updateProduct" auth="true">
        <description>Update a Product</description>
        <implements service="interfaceProduct"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="updateProductQuickAdminName" default-entity-name="Product" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="updateProductQuickAdminName" auth="true">
        <description>Update a Product from Quick Admin</description>
        <implements service="interfaceProduct"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="updateProductQuickAdminShipping" default-entity-name="Product" engine="java"
                location="org.apache.ofbiz.product.product.ProductServices" invoke="updateProductQuickAdminShipping" auth="true">
        <description>Update product characteristics from Quick Admin</description>
        <implements service="interfaceProduct"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="duplicateProduct" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="duplicateProduct" auth="true">
        <description>Duplicate a Product using a new productId</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="oldProductId" type="String" mode="IN" optional="false"/>
        <attribute name="newInternalName" type="String" mode="IN" optional="true"/>
        <attribute name="newProductName" type="String" mode="IN" optional="true"/>
        <attribute name="newDescription" type="String" mode="IN" optional="true" allow-html="safe"/>
        <attribute name="newLongDescription" type="String" mode="IN" optional="true" allow-html="safe"/>
        <attribute name="duplicatePrices" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateIDs" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateContent" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateCategoryMembers" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateAssocs" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateAttributes" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateFeatureAppls" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateInventoryItems" type="String" mode="IN" optional="true"/>
        <attribute name="removePrices" type="String" mode="IN" optional="true"/>
        <attribute name="removeIDs" type="String" mode="IN" optional="true"/>
        <attribute name="removeContent" type="String" mode="IN" optional="true"/>
        <attribute name="removeCategoryMembers" type="String" mode="IN" optional="true"/>
        <attribute name="removeAssocs" type="String" mode="IN" optional="true"/>
        <attribute name="removeAttributes" type="String" mode="IN" optional="true"/>
        <attribute name="removeFeatureAppls" type="String" mode="IN" optional="true"/>
        <attribute name="removeInventoryItems" type="String" mode="IN" optional="true"/>
    </service>
    <service name="copyToProductVariants" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="copyToProductVariants" auth="true">
        <description>Copy Virtual Product's data to the Variant Products</description>
        <attribute name="virtualProductId" type="String" mode="IN" optional="false"/>
        <attribute name="removeBefore" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateProduct" type="String" mode="IN" optional="true"/>
        <attribute name="duplicatePrices" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateIDs" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateContent" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateCategoryMembers" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateAttributes" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateFacilities" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateLocations" type="String" mode="IN" optional="true"/>
    </service>

    <service name="quickAddVariant" engine="java"
            location="org.apache.ofbiz.product.product.ProductServices" invoke="quickAddVariant">
        <description>Create a new product variant</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="productFeatureIds" type="String" mode="IN" optional="false"/>
        <attribute name="productVariantId" type="String" mode="INOUT" optional="false"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
    </service>

    <service name="createSalesAgreement" engine="group" location="createSalesAgreement" invoke="" auth="true">
        <description>Create a new sales agreement with customer for the product</description>
        <implements service="createAgreement"/>
        <implements service="createAgreementItem"/>
        <implements service="createAgreementProductAppl"/>
    </service>

    <service name="quickCreateVirtualWithVariants" engine="java"
            location="org.apache.ofbiz.product.product.ProductServices" invoke="quickCreateVirtualWithVariants">
        <description>
            This will create a virtual product and return its ID, and associate all of the variants with it.
            It will not put the selectable features on the virtual or standard features on the variant.
        </description>
        <attribute name="productId" type="String" mode="INOUT" optional="true"/>
        <attribute name="variantProductIdsBag" type="String" mode="IN" optional="false"/>
        <attribute name="productFeatureIdOne" type="String" mode="IN" optional="true"/>
        <attribute name="productFeatureIdTwo" type="String" mode="IN" optional="true"/>
        <attribute name="productFeatureIdThree" type="String" mode="IN" optional="true"/>
    </service>

    <!-- Product Keyword Services -->
    <service name="createProductKeyword" default-entity-name="ProductKeyword" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductKeyword</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductKeyword" default-entity-name="ProductKeyword" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductKeyword</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductKeyword" default-entity-name="ProductKeyword" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductKeyword</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="deleteProductKeywords" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="deleteProductKeywords" auth="true">
        <description>Delete all the keywords of a product</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
    </service>
    <service name="indexProductKeywords" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="indexProductKeywords" auth="false">
        <description>Index the Keywords for a Product</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="productInstance" type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
    </service>
    <service name="forceIndexProductKeywords" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="forceIndexProductKeywords" auth="true">
        <description>Induce all the keywords of a product, ignoring the flag in the Product.autoCreateKeywords flag</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
    </service>

    <service name="discontinueProductSales" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="discontinueProductSales" auth="false">
        <description>Discontinue Product Sales</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
    </service>

    <service name="countProductView" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="countProductView" auth="false">
        <description>count Product View</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="weight" type="Long" mode="IN" optional="true"/>
    </service>

    <service name="createProductReview" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="createProductReview" auth="true">
        <description>Create a product review entity</description>
        <auto-attributes entity-name="ProductReview" mode="IN" include="nonpk" optional="true"/>
        <attribute name="productReviewId" type="String" mode="OUT" optional="false"/>
        <override name="productStoreId" optional="false"/>
        <override name="productId" optional="false"/>
        <override name="productRating" optional="false"/>
    </service>
    <service name="updateProductReview" engine="groovy" default-entity-name="ProductReview"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="updateProductReview" auth="true">
        <description>Updates a product review record</description>
        <required-permissions join-type="OR">
            <check-permission permission="CATALOG_UPDATE"/>
            <check-permission permission="CATALOG_ADMIN"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
        <auto-attributes mode="IN" include="nonpk" optional="true"/>
    </service>
    <service name="setProductReviewStatus" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="setProductReviewStatus" auth="true">
        <description>Updates a product review record</description>
        <required-permissions join-type="OR">
            <check-permission permission="CATALOG_UPDATE"/>
            <check-permission permission="CATALOG_ADMIN"/>
        </required-permissions>
        <attribute name="productReviewId" type="String" mode="INOUT" optional="false"/>
        <attribute name="statusId" type="String" mode="IN" optional="false"/>
    </service>

    <service name="findProductById" engine="java"  auth="true" export="true" action="GET"
        location="org.apache.ofbiz.product.product.ProductServices" invoke="findProductById">
        <description>Finds productId(s) corresponding to a product reference, productId or a GoodIdentification idValue</description>
        <attribute type="String" mode="IN" name="idToFind" optional="false"/>
        <attribute type="String" mode="IN" name="goodIdentificationTypeId" optional="true"/>
        <attribute type="String" mode="IN" name="searchProductFirst" optional="true"/>
        <attribute type="String" mode="IN" name="searchAllId" optional="true"/>
        <attribute type="org.apache.ofbiz.entity.GenericValue" mode="OUT" name="product" optional="true"/>
        <attribute type="List" mode="OUT" name="productsList" optional="true"/>
    </service>

    <!-- Product Association Services -->

    <service name="createProductAssoc" default-entity-name="ProductAssoc" engine="entity-auto" invoke="create" auth="true">
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductAssoc" default-entity-name="ProductAssoc" engine="entity-auto" invoke="update" auth="true">
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductAssoc" default-entity-name="ProductAssoc" engine="entity-auto" invoke="delete" auth="true">
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Price Services -->
    <service name="createProductPrice" default-entity-name="ProductPrice" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/price/PriceServicesScript.groovy" invoke="createProductPrice" auth="true">
        <description>
            Create a Product Price.

            If taxAuthGeoId and taxAuthPartyId are passed in then the price will be considered a price
            with tax included (the priceWithoutTax, priceWithTax, taxAmount, and taxPercentage fields will also be populated).

            If the taxInPrice field is 'Y' then the price field will be left with the tax included (price will be equal to priceWithTax),
            otherwise tax will be removed from the passed in price and the price field will be equal to the priceWithoutTax field.

            If taxAuthGeoId or taxAuthPartyId empty then the taxInPrice field will be ignored.
        </description>
        <permission-service service-name="checkProductRelatedPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true">
            <exclude field-name="priceWithoutTax"/>
            <exclude field-name="priceWithTax"/>
            <exclude field-name="taxAmount"/>
            <exclude field-name="createdDate"/>
            <exclude field-name="createdByUserLogin"/>
            <exclude field-name="lastModifiedDate"/>
            <exclude field-name="lastModifiedByUserLogin"/>
        </auto-attributes>
        <override name="fromDate" mode="INOUT" optional="true"/>
        <override name="price" optional="false"/>
    </service>
    <service name="updateProductPrice" default-entity-name="ProductPrice" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/price/PriceServicesScript.groovy" invoke="updateProductPrice" auth="true">
        <description>Update an ProductPrice</description>
        <permission-service service-name="checkProductRelatedPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true">
            <exclude field-name="priceWithoutTax"/>
            <exclude field-name="priceWithTax"/>
            <exclude field-name="taxAmount"/>
            <exclude field-name="createdDate"/>
            <exclude field-name="createdByUserLogin"/>
            <exclude field-name="lastModifiedDate"/>
            <exclude field-name="lastModifiedByUserLogin"/>
        </auto-attributes>
        <attribute name="oldPrice" type="BigDecimal" mode="OUT" optional="false"/>
        <override name="price" optional="false"/>
    </service>
    <service name="deleteProductPrice" default-entity-name="ProductPrice" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/price/PriceServicesScript.groovy" invoke="deleteProductPrice" auth="true">
        <description>Delete an ProductPrice</description>
        <permission-service service-name="checkProductRelatedPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <attribute name="oldPrice" type="BigDecimal" mode="OUT" optional="false"/>
    </service>

    <!-- called by ECAs on ProductPrice service call events -->
    <service name="saveProductPriceChange" default-entity-name="ProductPriceChange" engine="entity-auto" invoke="create" auth="true">
        <description>Save History of a ProductPrice Change</description>
        <permission-service service-name="productPriceGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false" entity-name="ProductPrice"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="productPriceChangeId" type="String" mode="OUT"/>
    </service>

    <!-- Product PaymentMethodType Services -->
    <service name="createProductPaymentMethodType" default-entity-name="ProductPaymentMethodType" engine="entity-auto" invoke="create" auth="true">
        <description>Create an ProductPaymentMethodType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateProductPaymentMethodType" default-entity-name="ProductPaymentMethodType" engine="entity-auto" invoke="update" auth="true">
        <description>Update an ProductPaymentMethodType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductPaymentMethodType" default-entity-name="ProductPaymentMethodType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete an ProductPaymentMethodType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- GoodIdentification Services -->
    <service name="createGoodIdentification" default-entity-name="GoodIdentification" engine="entity-auto" invoke="create" auth="true">
        <description>Create a GoodIdentification</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="false"/>
    </service>
    <service name="updateGoodIdentification" default-entity-name="GoodIdentification" engine="entity-auto" invoke="update" auth="true">
        <description>Update a GoodIdentification</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="false"/>
    </service>
    <service name="deleteGoodIdentification" default-entity-name="GoodIdentification" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a GoodIdentification</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductGlAccount Services -->
    <service name="createProductGlAccount" default-entity-name="ProductGlAccount" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductGlAccount</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="false"/>
    </service>
    <service name="updateProductGlAccount" default-entity-name="ProductGlAccount" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductGlAccount</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="false"/>
    </service>
    <service name="deleteProductGlAccount" default-entity-name="ProductGlAccount" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductGlAccount</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product content services -->
    <service name="createProductContent" default-entity-name="ProductContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="createProductContent" auth="true">
        <description>Add Content To Product</description>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" default-value="${date:nowTimestamp()}"/>
    </service>
    <service name="updateProductContent" default-entity-name="ProductContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="updateProductContent" auth="true">
        <description>Update Content To Product</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="removeProductContent" default-entity-name="ProductContent" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove Content From Product</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="createEmailContentForProduct" default-entity-name="ProductContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="createEmailContentForProduct" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes mode="IN" entity-name="Content" optional="true"/>
        <attribute name="subject" type="String" mode="IN" optional="false"/>
        <attribute name="plainBody" type="String" mode="IN" optional="false"/>
        <attribute name="htmlBody" type="String" mode="IN" optional="true" allow-html="safe"/>
        <override name="contentId" optional="true" mode="INOUT"/>
    </service>
    <service name="updateEmailContentForProduct" default-entity-name="ProductContent" engine="group" auth="true">
        <description>Update Email Content For Product</description>
        <group>
            <invoke name="updateProductContent"/>
            <invoke name="updateEmailContent"/>
        </group>
    </service>
    <service name="createDownloadContentForProduct" default-entity-name="ProductContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="createDownloadContentForProduct" auth="true">
        <auto-attributes include="pk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" entity-name="Content" optional="true"/>
        <attribute mode="IN" name="imageData" optional="true" type="java.nio.ByteBuffer"/>
        <attribute mode="IN" name="_imageData_contentType" optional="true" type="String"/>
        <attribute mode="IN" name="_imageData_fileName" optional="true" type="String"/>
        <override name="productContentTypeId" optional="false"/>
    </service>
    <service name="updateDownloadContentForProduct" default-entity-name="ProductContent" engine="group" auth="true">
        <description>Update Download Content For Product</description>
        <group>
            <invoke name="updateProductContent"/>
            <invoke name="updateDownloadContent"/>
        </group>
    </service>

    <service name="createSimpleTextContentForProduct" default-entity-name="ProductContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="createSimpleTextContentForProduct" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
        <attribute name="text" type="String" mode="IN" optional="false" allow-html="safe"/>
        <override name="contentId" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateSimpleTextContentForProduct" default-entity-name="ProductContent" engine="group" auth="true">
        <description>Update Simple Text Content For Product</description>
        <group>
            <invoke name="updateProductContent"/>
            <invoke name="updateSimpleTextContent"/>
        </group>
    </service>

    <service name="createSimpleTextContentForAlternateLocale" engine="groovy" 
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="createSimpleTextContentForAlternateLocale">
        <auto-attributes mode="IN" entity-name="Content" optional="true"/>
        <attribute name="mainContentId" type="String" mode="IN" optional="false"/>
        <attribute name="text" type="String" mode="IN" optional="false" allow-html="safe"/>
        <override name="localeString" optional="false"/>
        <override name="contentId" mode="INOUT"/>
    </service>

    <service name="addAdditionalViewForProduct" default-entity-name="ProductContent" engine="java"
        location="org.apache.ofbiz.product.product.ProductServices" invoke="addAdditionalViewForProduct" auth="true">
        <implements service="uploadFileInterface"/>
        <auto-attributes include="pk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute mode="IN" name="contentId" optional="true" type="String"/>
        <override name="productContentTypeId" optional="false"/>
        <override name="productId" optional="false"/>
    </service>

    <service name="uploadProductAdditionalViewImages" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="uploadProductAdditionalViewImages" auth="true">
        <description>Upload Additional View Images For Product</description>
        <permission-service service-name="genericContentPermission" main-action="UPDATE"/>
        <attribute name="productId" type="String" mode="INOUT" optional="false"/>
        <attribute name="additionalImageOne" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageOne_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageOne_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageTwo" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageTwo_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageTwo_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageThree" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageThree_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageThree_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageFour" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageFour_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageFour_contentType" type="String" mode="IN" optional="true"/>
    </service>

    <service name="updateContentSEOForProduct" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductContentServicesScript.groovy" invoke="updateContentSEOForProduct" auth="true">
        <description>Update Product SEO</description>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="title" mode="IN" type="String" optional="true"/>
        <attribute name="metaKeyword" mode="IN" type="String" optional="true"/>
        <attribute name="metaDescription" mode="IN" type="String" optional="true"/>
    </service>

    <!-- SupplierProduct Services -->
    <service name="createSupplierProduct" default-entity-name="SupplierProduct" engine="entity-auto" invoke="create" auth="true">
        <description>Create a new SupplierProduct record</description>
        <required-permissions join-type="AND">
            <check-permission permission="CATALOG" action="_CREATE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
        <auto-attributes mode="IN" include="nonpk" optional="true"/>
        <override name="supplierProductId" optional="false"/>
        <override name="lastPrice" optional="false"/>
    </service>
    <service name="updateSupplierProduct" default-entity-name="SupplierProduct" engine="entity-auto" invoke="update" auth="true">
        <description>Update a SupplierProduct record</description>
        <required-permissions join-type="AND">
            <check-permission permission="CATALOG" action="_UPDATE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
        <auto-attributes mode="IN" include="nonpk" optional="true"/>
    </service>
    <service name="removeSupplierProduct" default-entity-name="SupplierProduct" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove a SupplierProduct record</description>
        <required-permissions join-type="AND">
            <check-permission permission="CATALOG" action="_DELETE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
    </service>

    <!-- supplier product feature services -->
    <service name="createSupplierProductFeature" default-entity-name="SupplierProductFeature" engine="entity-auto" invoke="create" auth="true">
        <description>Create a new SupplierProductFeature record</description>
        <required-permissions join-type="AND">
            <check-permission permission="CATALOG" action="_CREATE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
        <auto-attributes mode="IN" include="nonpk" optional="true"/>
    </service>
    <service name="updateSupplierProductFeature" default-entity-name="SupplierProductFeature" engine="entity-auto" invoke="update" auth="true">
        <description>Update a SupplierProduct record</description>
        <required-permissions join-type="AND">
            <check-permission permission="CATALOG" action="_UPDATE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
        <auto-attributes mode="IN" include="nonpk" optional="true"/>
    </service>
    <service name="removeSupplierProductFeature" default-entity-name="SupplierProductFeature" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove a SupplierProduct record</description>
        <required-permissions join-type="AND">
            <check-permission permission="CATALOG" action="_DELETE"/>
        </required-permissions>
        <auto-attributes mode="IN" include="pk" optional="false"/>
    </service>
    <service name="getSupplierProductFeatures" engine="groovy" invoke="getSupplierProductFeatures"
             location="component://product/src/main/groovy/org/apache/ofbiz/product/product/supplier/SupplierProductServicesScript.groovy">
        <description>Finds a list of SupplierProductFeature entities based on the productFeatureId.
            If a partyId is given, only product feature information for that supplier party is returned.</description>
        <attribute name="productFeatureId" type="String" mode="IN"/>
        <attribute name="partyId" type="String" mode="IN" optional="true"/>
        <attribute name="supplierProductFeatures" type="java.util.List" mode="OUT"/>
    </service>

    <service name="createProductMaint" default-entity-name="ProductMaint" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductMaint</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="productMaintSeqId" mode="OUT"/> <!-- make this OUT rather than IN, we will automatically generate the next sub-sequence ID -->
    </service>
    <service name="updateProductMaint" default-entity-name="ProductMaint" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductMaint</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductMaint" default-entity-name="ProductMaint" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductMaint</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="createProductMeter" default-entity-name="ProductMeter" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductMeter</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductMeter" default-entity-name="ProductMeter" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductMeter</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductMeter" default-entity-name="ProductMeter" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductMeter</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="createProductGeo" default-entity-name="ProductGeo" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductGeo</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductGeo" default-entity-name="ProductGeo" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductGeo</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductGeo" default-entity-name="ProductGeo" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductGeo</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="createCommunicationEventProduct" default-entity-name="CommunicationEventProduct" engine="entity-auto" invoke="create" auth="true">
        <description>Create a Communication Event Product</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="removeCommunicationEventProduct" default-entity-name="CommunicationEventProduct" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove a Communication Event Product</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ======================================== -->
    <!-- Product Catalog Services -->
    <!-- ======================================== -->
    <service name="createProdCatalog" default-entity-name="ProdCatalog" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProdCatalog</description>
        <permission-service service-name="catalogPermissionCheck" main-action="CREATE"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="catalogName" optional="false"/>
    </service>
    <service name="updateProdCatalog" default-entity-name="ProdCatalog" engine="entity-auto" invoke="update" auth="true">
        <description>Update an ProdCatalog</description>
        <permission-service service-name="catalogPermissionCheck" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="catalogName" optional="false"/>
    </service>
    <service name="deleteProdCatalog" default-entity-name="ProdCatalog" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete an ProdCatalog</description>
        <permission-service service-name="catalogPermissionCheck" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="addProductCategoryToProdCatalog" default-entity-name="ProdCatalogCategory" engine="entity-auto" invoke="create" auth="true">
        <description>Add ProductCategory To ProdCatalog</description>
        <permission-service service-name="catalogPermissionCheck" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateProductCategoryToProdCatalog" default-entity-name="ProdCatalogCategory" engine="entity-auto" invoke="update" auth="true">
        <description>Add ProductCategory To ProdCatalog</description>
        <permission-service service-name="catalogPermissionCheck" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="prodCatalogCategoryTypeId" optional="false"/>
    </service>
    <service name="removeProductCategoryFromProdCatalog" default-entity-name="ProdCatalogCategory" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove ProductCategory From ProdCatalog</description>
        <permission-service service-name="catalogPermissionCheck" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="addProdCatalogToParty" default-entity-name="ProdCatalogRole" engine="entity-auto" invoke="create" auth="true">
        <description>Add ProdCatalog To Party</description>
        <permission-service service-name="prodCatalogToPartyPermissionCheck" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateProdCatalogToParty" default-entity-name="ProdCatalogRole" engine="entity-auto" invoke="update" auth="true">
        <description>Add ProdCatalog To Party</description>
        <permission-service service-name="prodCatalogToPartyPermissionCheck" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="removeProdCatalogFromParty" default-entity-name="ProdCatalogRole" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove ProdCatalog From Party</description>
        <permission-service service-name="prodCatalogToPartyPermissionCheck" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ======================================== -->
    <!-- Product Category Services -->
    <!-- ======================================== -->
    <service name="createProductCategory" default-entity-name="ProductCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="createProductCategory" auth="true">
        <description>Create an ProductCategory</description>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="productCategoryTypeId" optional="false"/>
    </service>
    <service name="updateProductCategory" default-entity-name="ProductCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="updateProductCategory" auth="true">
        <description>Update an ProductCategory</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="productCategoryTypeId" optional="false"/>
    </service>

    <service name="duplicateProductCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="duplicateProductCategory" auth="true">
        <description>Duplicate a Product Category using from oldProductCategoryId to a new productCategoryId</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="oldProductCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="duplicateContent" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateParentRollup" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateChildRollup" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateMembers" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateCatalogs" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateFeatureCategories" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateFeatureGroups" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateAttributes" type="String" mode="IN" optional="true"/>
        <attribute name="duplicateRoles" type="String" mode="IN" optional="true"/>
    </service>

    <service name="safeAddProductToCategory" default-entity-name="ProductCategoryMember" engine="entity-auto" invoke="create" auth="true">
        <description>Add Product To Category</description>
        <permission-service service-name="checkCategoryPermissionWithViewPurchaseAllow" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="addProductToCategories" default-entity-name="ProductCategoryMember" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="addProductToCategories" auth="true">
        <description>Add Product To Multiple Categories</description>
        <permission-service service-name="checkCategoryPermissionWithViewPurchaseAllow" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false">
            <exclude field-name="productCategoryId"/>
        </auto-attributes>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="categories" type="Object" mode="IN" optional="false"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="addProductToCategory" default-entity-name="ProductCategoryMember" engine="entity-auto" invoke="create" auth="true">
        <description>Add Product To Category</description>
        <permission-service service-name="checkCategoryPermissionWithViewPurchaseAllow" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateProductToCategory" default-entity-name="ProductCategoryMember" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductCategoryMember</description>
        <permission-service service-name="checkCategoryPermissionWithViewPurchaseAllow" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="removeProductFromCategory" default-entity-name="ProductCategoryMember" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="removeProductFromCategory" auth="true">
        <description>Remove Product From Category</description>
        <permission-service service-name="checkCategoryPermissionWithViewPurchaseAllow" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createProductInCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="createProductInCategory" auth="true">
        <description></description>
        <auto-attributes entity-name="ProductCategory" include="pk" mode="IN" optional="false"/>
        <auto-attributes entity-name="Product" include="pk" mode="INOUT" optional="true"/>
        <auto-attributes entity-name="Product" include="nonpk" mode="IN" optional="true"/>
        <attribute name="productFeatureIdByType" type="java.util.Map" mode="IN" optional="false" string-map-prefix="pft_"/>
        <attribute name="productFeatureSelectableByType" type="java.util.Map" mode="IN" optional="false" string-map-prefix="pftsel_"/>
        <attribute name="defaultPrice" type="BigDecimal" mode="IN" optional="true"/>
        <attribute name="averageCost" type="BigDecimal" mode="IN" optional="true"/>
        <attribute name="currencyUomId" type="String" mode="IN" optional="true"/>
    </service>

    <service name="addPartyToCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="addPartyToCategory" auth="true">
        <description>Add Party To Category</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="false"/>
        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="comments" type="String" mode="IN" optional="true"/>
    </service>
    <service name="updatePartyToCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="updatePartyToCategory" auth="true">
        <description>Update Party To Category</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="false"/>
        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="comments" type="String" mode="IN" optional="true"/>
    </service>
    <service name="removePartyFromCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="removePartyFromCategory" auth="true">
        <description>Remove Party From Category</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="false"/>
        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
    </service>

    <service name="addPartyToProduct" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="addPartyToProduct" auth="true">
        <description>Add Party To Product</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="false"/>
        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
        <attribute name="comments" type="String" mode="IN" optional="true"/>
    </service>
    <service name="updatePartyToProduct" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="updatePartyToProduct" auth="true">
        <description>Update Party To Product</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="false"/>
        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
        <attribute name="comments" type="String" mode="IN" optional="true"/>
    </service>
    <service name="removePartyFromProduct" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="removePartyFromProduct" auth="true">
        <description>Remove Party From Product</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="false"/>
        <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
    </service>

    <service name="safeAddProductCategoryToCategory" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="addProductCategoryToCategory" auth="true">
        <description>Safe Add ProductCategory To Category (requires fromDate)</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="parentProductCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
    </service>

    <service name="addProductCategoryToCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="addProductCategoryToCategory" auth="true">
        <description>Add ProductCategory To Category</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="parentProductCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
    </service>
    <service name="addProductCategoryToCategories" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="addProductCategoryToCategories" auth="true">
        <description>Add ProductCategory To Categories</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="categories" type="Object" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
    </service>
    <service name="updateProductCategoryToCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="updateProductCategoryToCategory" auth="true">
        <description>Update ProductCategory To Category</description>
        <attribute name="productCategoryId" type="String" mode="INOUT" optional="false"/>
        <attribute name="parentProductCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
    </service>
    <service name="removeProductCategoryFromCategory" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="removeProductCategoryFromCategory" auth="true">
        <description>Remove ProductCategory From Category</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="parentProductCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
    </service>

    <!-- Product Category Attribute SErvices -->
    <service name="createProductCategoryAttribute" default-entity-name="ProductCategoryAttribute" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy"
            invoke="createProductCategoryAttribute" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductCategoryAttribute" default-entity-name="ProductCategoryAttribute" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy"
            invoke="updateProductCategoryAttribute" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductCategoryAttribute" default-entity-name="ProductCategoryAttribute" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy"
            invoke="deleteProductCategoryAttribute" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Category Link Services -->
    <service name="createProductCategoryLink" default-entity-name="ProductCategoryLink" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy"
            invoke="createProductCategoryLink" auth="true">
        <description>Create a ProductCategoryLink</description>
        <permission-service service-name="productCategoryGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
        <override name="linkSeqId" optional="true"/>
    </service>
    <service name="updateProductCategoryLink" default-entity-name="ProductCategoryLink" engine="entity-auto"
           invoke="update" auth="true">
        <description>Update a ProductCategoryLink</description>
        <permission-service service-name="productCategoryGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductCategoryLink" default-entity-name="ProductCategoryLink" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductCategoryLink</description>
        <permission-service service-name="productCategoryGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="duplicateCategoryEntities" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="duplicateCategoryEntities" auth="true">
        <description>Duplicates a named entity from one productCategoryId to another</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="productCategoryIdTo" type="String" mode="IN" optional="false"/>
        <attribute name="entityName" type="String" mode="IN" optional="false"/>
        <attribute name="validDate" type="Timestamp" mode="IN" optional="true"/>
    </service>


    <!-- Category content services -->
    <service name="createCategoryContent" default-entity-name="ProductCategoryContent" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="createCategoryContent" auth="true">
        <description>Add Content To Category</description>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
        <!--<override name="contentId" optional="true" mode="INOUT"/>-->
    </service>
    <service name="updateCategoryContent" default-entity-name="ProductCategoryContent" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="updateCategoryContent" auth="true">
        <description>Update Content To Category</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="removeCategoryContent" default-entity-name="ProductCategoryContent" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove Content From Category</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createSimpleTextContentForCategory" default-entity-name="ProductCategoryContent" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="createSimpleTextContentForCategory" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
        <attribute name="text" type="String" mode="IN" optional="false" allow-html="safe"/>
        <override name="contentId" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateSimpleTextContentForCategory" engine="group" auth="true">
        <description>Update Simple Text Content For Product Category</description>
        <group>
            <invoke name="updateCategoryContent"/>
            <invoke name="updateSimpleTextContent"/>
        </group>
    </service>

    <service name="updateContentSEOForCategory" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="updateContentSEOForCategory" auth="true">
        <description>Update SEO Content For Product Category</description>
        <attribute name="productCategoryId" mode="IN" type="String" optional="false"/>
        <attribute name="title" mode="IN" type="String" optional="true"/>
        <attribute name="metaKeyword" mode="IN" type="String" optional="true"/>
        <attribute name="metaDescription" mode="IN" type="String" optional="true"/>
    </service>

    <service name="createRelatedUrlContentForCategory" engine="groovy" default-entity-name="ProductCategoryContent"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="createRelatedUrlContentForCategory" auth="true">
        <description>Create Related URL Content For Product Category</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="title" type="String" mode="IN" optional="false"/>
        <attribute name="description" type="String" mode="IN" optional="false"/>
        <attribute name="url" type="String" mode="IN" optional="false"/>
        <attribute name="localeString" type="String" mode="IN" optional="true"/>
        <override name="contentId" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateRelatedUrlContentForCategory" engine="groovy" default-entity-name="ProductCategoryContent"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="updateRelatedUrlContentForCategory" auth="true">
        <description>Update Related URL Content For Product Category</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="contentId" type="String" mode="IN" optional="false"/>
        <attribute name="dataResourceId" type="String" mode="IN" optional="false"/>
        <attribute name="title" type="String" mode="IN" optional="true"/>
        <attribute name="description" type="String" mode="IN" optional="true"/>
        <attribute name="url" type="String" mode="IN" optional="true"/>
        <attribute name="localeString" type="String" mode="IN" optional="true"/>
    </service>

    <service name="createDownloadContentForCategory" default-entity-name="ProductCategoryContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="createDownloadContentForCategory" auth="true">
        <implements service="uploadFileInterface"/>
        <auto-attributes include="pk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" entity-name="Content" optional="true"/>
        <attribute name="dataResourceTypeId" type="String" mode="IN" optional="true"/>
        <override name="prodCatContentTypeId" optional="false"/>
    </service>
    <service name="updateDownloadContentForCategory" default-entity-name="ProductCategoryContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryContentServicesScript.groovy" invoke="updateDownloadContentForCategory" auth="true">
        <implements service="uploadFileInterface"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes mode="IN" entity-name="Content" optional="true"/>
        <attribute name="fileDataResourceId" type="String" mode="IN" optional="true"/>
    </service>

    <!-- ProductFeatureDataResource services -->
    <service name="createProductFeatureDataResource" default-entity-name="ProductFeatureDataResource" engine="entity-auto" invoke="create" auth="true">
        <description>Create ProductFeature-DataResource</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="removeProductFeatureDataResource" default-entity-name="ProductFeatureDataResource" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove ProductFeature-DataResource</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Customer driven (customers are suppliers) digital download product services -->
    <service name="createCustomerDigitalDownloadProduct" auth="true" engine="simple"
        location="component://product/minilang/product/product/CustomerDigitalDownloadServices.xml" invoke="createCustomerDigitalDownloadProduct">
        <description></description>
        <attribute name="productName" type="String" mode="IN" optional="false"/>
        <attribute name="productStoreId" type="String" mode="IN" optional="false"/>
        <attribute name="price" type="BigDecimal" mode="IN" optional="false"/>
        <attribute name="description" type="String" mode="IN" optional="true"/>
        <attribute name="currencyUomId" type="String" mode="IN" optional="true"/>
        <attribute name="productId" type="String" mode="OUT" optional="false"/>
        <attribute name="currencyUomId" type="String" mode="OUT" optional="false"/>
        <attribute name="minimumOrderQuantity" type="BigDecimal" mode="OUT" optional="false"/>
        <attribute name="availableFromDate" type="Timestamp" mode="OUT" optional="false"/>
    </service>
    <service name="updateCustomerDigitalDownloadProduct" auth="true" engine="simple"
        location="component://product/minilang/product/product/CustomerDigitalDownloadServices.xml" invoke="updateCustomerDigitalDownloadProduct">
        <description></description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="currencyUomId" type="String" mode="IN" optional="false"/>
        <attribute name="minimumOrderQuantity" type="BigDecimal" mode="IN" optional="false"/>
        <attribute name="availableFromDate" type="Timestamp" mode="IN" optional="false"/>
        <attribute name="productName" type="String" mode="IN" optional="true"/>
        <attribute name="description" type="String" mode="IN" optional="true"/>
        <attribute name="price" type="BigDecimal" mode="IN" optional="true"/>
    </service>
    <service name="deleteCustomerDigitalDownloadProduct" auth="true" engine="simple"
        location="component://product/minilang/product/product/CustomerDigitalDownloadServices.xml" invoke="deleteCustomerDigitalDownloadProduct">
        <description></description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
    </service>

    <service name="addCustomerDigitalDownloadProductFile" auth="true" engine="simple"
        location="component://product/minilang/product/product/CustomerDigitalDownloadServices.xml" invoke="addCustomerDigitalDownloadProductFile">
        <description></description>
        <attribute name="contentId" type="String" mode="IN" optional="false"/>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
    </service>
    <service name="removeCustomerDigitalDownloadProductFile" auth="true" engine="simple"
        location="component://product/minilang/product/product/CustomerDigitalDownloadServices.xml" invoke="removeCustomerDigitalDownloadProductFile">
        <description></description>
        <attribute name="contentId" type="String" mode="IN" optional="false"/>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="productContentTypeId" type="String" mode="IN" optional="false"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
    </service>

    <!-- Product Configuration Services -->
    <service name="createProductConfig" default-entity-name="ProductConfig" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductConfig</description>
        <permission-service service-name="productPriceGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" mode="INOUT" optional="true"/>
    </service>
    <service name="updateProductConfig" default-entity-name="ProductConfig" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductConfig</description>
        <permission-service service-name="productPriceGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductConfig" default-entity-name="ProductConfig" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductConfig</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Config Items Services -->
    <service name="createProductConfigItem" default-entity-name="ProductConfigItem" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductConfigItem</description>
        <permission-service service-name="productPriceGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="configItemId" mode="OUT"/>
    </service>
    <service name="updateProductConfigItem" default-entity-name="ProductConfigItem" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductConfigItem</description>
        <permission-service service-name="productPriceGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductConfigItem" default-entity-name="ProductConfigItem" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductConfigItem</description>
        <permission-service service-name="productPriceGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Config Options Services -->
    <service name="createProductConfigOption" default-entity-name="ProductConfigOption" engine="entity-auto" invoke="create" auth="true">
        <description>Create a Config Option</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="OUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="configItemId" type="String" mode="IN" optional="false"/><!-- FIXME -->
    </service>
    <service name="updateProductConfigOption" default-entity-name="ProductConfigOption" engine="entity-auto" invoke="update" auth="true">
        <description>Update a Config Option</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductConfigOption" default-entity-name="ProductConfigOption" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a Config Option</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Config Product Services -->
    <service name="createProductConfigProduct" default-entity-name="ProductConfigProduct" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductConfigProduct</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductConfigProduct" default-entity-name="ProductConfigProduct" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductConfigProduct</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductConfigProduct" default-entity-name="ProductConfigProduct" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductConfigProduct</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Config Item content services -->
    <service name="createProductConfigItemContent" default-entity-name="ProdConfItemContent" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/config/ProductConfigItemContentServicesScript.groovy" invoke="createProductConfigItemContent" auth="true">
        <description>Add Content To ProductConfigItem</description>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
        <!--<override name="contentId" optional="true" mode="INOUT"/>-->
    </service>
    <service name="updateProductConfigItemContent" default-entity-name="ProdConfItemContent" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/config/ProductConfigItemContentServicesScript.groovy" invoke="updateProductConfigItemContent" auth="true">
        <description>Update Content To ProductConfigItem</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="removeProductConfigItemContent" default-entity-name="ProdConfItemContent" engine="entity-auto" invoke="delete" auth="true">
        <description>Remove Content From ProductConfigItem</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="createSimpleTextContentForProductConfigItem" default-entity-name="ProdConfItemContent" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/config/ProductConfigItemContentServicesScript.groovy" invoke="createSimpleTextContentForProductConfigItem" auth="true">
        <attribute name="configItemId" type="String" mode="IN" optional="false"></attribute>
        <attribute name="contentId" type="String" mode="IN" optional="true"></attribute>
        <auto-attributes include="pk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes mode="IN" entity-name="Content" optional="true"/>
        <attribute name="text" type="String" mode="IN" optional="false" allow-html="safe"/>
        <override name="contentId" optional="true"/>
    </service>
    <service name="updateSimpleTextContentForProductConfigItem" default-entity-name="ProdConfItemContent" engine="group" auth="true">
        <description>Update Simple Text Content For Product</description>
        <group>
            <invoke name="updateProductConfigItemContent"/>
            <invoke name="updateSimpleTextContent"/>
        </group>
    </service>
    <service name="getProductFeaturesByType" engine="java"
            location="org.apache.ofbiz.product.feature.ProductFeatureServices" invoke="getProductFeaturesByType">
        <description>
            Returns a map of productFeatureTypeId -> List of ProductFeatures.  If supplied with a productFeatureCategoryId,
            the returned result is that of all product features in that category.  Otherwise, if supplied with a productFeatureGroupId,
            the result is all features of that feature group.  Otherwise, if there is a productId, the returned result is that of all features
            applied to that product.  If the optional productFeatureApplTypeId is specified, only features with application of that type
            will be returned (this would only make sense along with a productId parameter.)
        </description>
        <attribute type="String" mode="IN" name="productFeatureCategoryId" optional="true"/>
        <attribute type="String" mode="IN" name="productFeatureGroupId" optional="true"/>
        <attribute type="String" mode="IN" name="productId" optional="true"/>
        <attribute type="String" mode="IN" name="productFeatureApplTypeId" optional="true"/>
        <attribute type="List" mode="OUT" name="productFeatureTypes" optional="false"/>
        <attribute type="Map" mode="OUT" name="productFeaturesByType" optional="false"/>
    </service>
    <service name="getAllExistingVariants" engine="java"
        location="org.apache.ofbiz.product.feature.ProductFeatureServices" invoke="getAllExistingVariants">
        <description>
            Takes a productId and a List of ProductFeatureAndAppl entities and returns a List of productIds which are
            existing varaints with those features applied.
        </description>
        <attribute type="String" mode="IN" name="productId" optional="false"/>
        <attribute type="List" mode="IN" name="productFeatureAppls" optional="false"/>
        <attribute type="List" mode="OUT" name="variantProductIds" optional="false"/>
    </service>
    <service name="getVariantCombinations" engine="java"
        location="org.apache.ofbiz.product.feature.ProductFeatureServices" invoke="getVariantCombinations">
        <description>
            For a product, returns a List of all possible product feature combinations, based on all SELECTABLE features which
            are applied to the product.  featureCombinations is a List of Maps with the following fields:
                defaultVariantProductId -> default productId for the variant, based on idCodes of the features
                curProductFeatureAndAppls -> List of product features to be applied to this variant
                existingVariantProductIds -> List of productIds of variants which already have these features
        </description>
        <attribute type="String" mode="IN" name="productId" optional="false"/>
        <attribute type="List" mode="OUT" name="featureCombinations" optional="false"/>
    </service>
     <service name="getCategoryVariantProducts" engine="java" auth="false"
         location="org.apache.ofbiz.product.feature.ProductFeatureServices" invoke="getCategoryVariantProducts">
         <description>Takes a productCategoryId and a list of product features and resolves all the product category's
             product members from virtual to variant</description>
         <attribute type="String" mode="IN" name="productCategoryId" optional="false"/>
         <attribute type="java.util.List" mode="IN" name="productFeatures" optional="false"/>
         <attribute type="java.util.List" mode="OUT" name="products"/>
     </service>
    <service name="updateProductIfAvailableFromShipment" engine="java"
            location="org.apache.ofbiz.product.product.ProductServices" invoke="updateProductIfAvailableFromShipment">
        <description>
            If property is set (catalog.properties) this will re-activate (null discountinue date) on the product
            if inventory is available. Triggered via ECA by shipment receipt services
        </description>
        <attribute type="String" mode="IN" name="inventoryItemId" optional="false"/>
    </service>

    <!-- Permission Services -->
    <service name="productGenericPermission" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="productGenericPermission">
        <implements service="permissionInterface"/>
    </service>
    <service name="productCategoryGenericPermission" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="productCategoryGenericPermission">
        <implements service="permissionInterface"/>
    </service>
    <service name="productPriceGenericPermission" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="productPriceGenericPermission">
        <implements service="permissionInterface"/>
    </service>
    <service name="checkCategoryPermissionWithViewPurchaseAllow" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/category/CategoryServicesScript.groovy" invoke="checkCategoryPermissionWithViewPurchaseAllow">
        <implements service="permissionInterface"/>
        <attribute type="String" mode="IN" name="productCategoryId" optional="true"/>
    </service>
    <!-- Product Attribute Services -->
    <service name="createProductAttribute" default-entity-name="ProductAttribute" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductAttribute</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductAttribute" default-entity-name="ProductAttribute" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductAttribute</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductAttribute" default-entity-name="ProductAttribute" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductAttribute</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!--VendorProduct Services -->
    <service name="createVendorProduct" engine="entity-auto" default-entity-name="VendorProduct" invoke="create" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>
    <service name="deleteVendorProduct" engine="entity-auto" default-entity-name="VendorProduct" invoke="delete" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductCategoryGlAccount Services -->
    <service name="createProductCategoryGlAccount" default-entity-name="ProductCategoryGlAccount" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="createProductCategoryGlAccount" auth="true">
        <description>Create a ProductCategoryGlAccount</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="false"/>
    </service>
    <service name="updateProductCategoryGlAccount" default-entity-name="ProductCategoryGlAccount" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="updateProductCategoryGlAccount" auth="true">
        <description>Update a ProductCategoryGlAccount</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="false"/>
    </service>
    <service name="deleteProductCategoryGlAccount" default-entity-name="ProductCategoryGlAccount" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="deleteProductCategoryGlAccount" auth="true">
        <description>Delete a ProductCategoryGlAccount</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="catalogPermissionCheck" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/catalog/CatalogServices.groovy" invoke="catalogPermissionCheck" auth="true">
        <description>Catalog Permission Checking Logic</description>
        <implements service="permissionInterface"/>
    </service>

    <service name="prodCatalogToPartyPermissionCheck" engine="groovy"
            location="component://product/src/main/groovy/org/apache/ofbiz/product/product/catalog/CatalogServices.groovy" invoke="prodCatalogToPartyPermissionCheck">
        <description>ProdCatalogToParty Permission Checking Logic</description>
        <implements service="permissionInterface"/>
    </service>

    <service name="productImportFromSpreadsheet" engine="java"
            location="org.apache.ofbiz.product.spreadsheetimport.ImportProductServices" invoke="productImportFromSpreadsheet" auth="true">
        <description>Create product and inventory item</description>
        <attribute name="dirName" type="java.lang.String" mode="IN" optional="true"/>
    </service>

    <!-- Start Web Analytics configuration services -->
    <service name="createWebAnalyticsConfig" default-entity-name="WebAnalyticsConfig" engine="entity-auto" invoke="create" auth="true">
        <description>Create a WebAnalyticsConfig</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateWebAnalyticsConfig" default-entity-name="WebAnalyticsConfig" engine="entity-auto" invoke="update" auth="true">
        <description>Update a WebAnalyticsConfig</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteWebAnalyticsConfig" default-entity-name="WebAnalyticsConfig" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a WebAnalyticsConfig</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createWebAnalyticsType" default-entity-name="WebAnalyticsType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a WebAnalyticsType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateWebAnalyticsType" default-entity-name="WebAnalyticsType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a WebAnalyticsType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteWebAnalyticsType" default-entity-name="WebAnalyticsType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a WebAnalyticsType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product Promo Content services -->
    <service name="createProductPromoContent" default-entity-name="ProductPromoContent" engine="entity-auto" invoke="create" auth="true">
        <description>Create Product Promo Content</description>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>
    <service name="updateProductPromoContent" default-entity-name="ProductPromoContent" engine="entity-auto" invoke="update" auth="true">
        <description>Update Product Promo Content</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="removeProductPromoContent" default-entity-name="ProductPromoContent" engine="entity-auto" invoke="expire" auth="true">
        <description>Cancel by the thru date a Product Promo Content</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="addImageForProductPromo" default-entity-name="ProductPromoContent" engine="java"
            location="org.apache.ofbiz.product.product.ProductServices" invoke="addImageForProductPromo" auth="true">
        <implements service="uploadFileInterface"/>
        <auto-attributes include="pk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="contentId" mode="IN" optional="true" type="String"/>
        <override name="productPromoContentTypeId" optional="false"/>
        <override name="productPromoId" optional="false"/>
    </service>

    <!-- Image Management Services -->
    <service name="addMultipleuploadForProduct" default-entity-name="ProductContent" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.ImageManagementServices" invoke="addMultipleuploadForProduct" auth="true">
        <implements service="uploadFileInterface"/>
        <auto-attributes include="pk" mode="IN" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute mode="INOUT" name="contentId" optional="true" type="String"/>
        <attribute mode="INOUT" name="dataResourceId" optional="true" type="String"/>
        <attribute mode="IN" name="imageResize" optional="true" type="String"/>
        <attribute mode="OUT" name="contentFrameId" optional="true" type="String"/>
        <attribute mode="OUT" name="dataResourceFrameId" optional="true" type="String"/>
        <override name="productContentTypeId" optional="false"/>
        <override name="productId" optional="false"/>
    </service>

    <service name="multipleUploadProductImages" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="uploadProductImages" auth="true">
        <description>Multiple upload Images For Product</description>
        <permission-service service-name="genericContentPermission" main-action="CREATE"/>
        <attribute name="productId" type="String" mode="INOUT" optional="false"/>
        <attribute name="imageResize" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageOne" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageOne_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageOne_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageTwo" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageTwo_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageTwo_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageThree" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageThree_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageThree_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageFour" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageFour_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageFour_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageFive" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageFive_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageFive_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageSix" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageSix_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageSix_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageSeven" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageSeven_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageSeven_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageEight" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageEight_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageEight_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageNine" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageNine_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageNine_contentType" type="String" mode="IN" optional="true"/>
        <attribute name="additionalImageTen" type="java.nio.ByteBuffer" mode="IN" optional="true"/>
        <attribute name="_additionalImageTen_fileName" type="String" mode="IN" optional="true"/>
        <attribute name="_additionalImageTen_contentType" type="String" mode="IN" optional="true"/>
    </service>

    <service name="removeProductContentAndImageFile" default-entity-name="ProductContent" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="removeProductContentAndImageFile" auth="true">
        <description>Remove Content From Product and File Image</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="removeProductContentForImageManagement" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="removeProductContentForImageManagement" auth="true">
        <description>Delete Product Content Relationship Entity</description>
        <attribute mode="IN" name="contentId" optional="false" type="String"/>
        <attribute mode="IN" name="productId" optional="false" type="String"/>
    </service>

    <service name="removeImageFileForImageManagement" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.ImageManagementServices" invoke="removeImageFileForImageManagement" auth="true">
        <description>Delete Image File</description>
        <attribute mode="IN" name="productId" optional="false" type="String"/>
        <attribute mode="IN" name="contentId" optional="false" type="String"/>
        <attribute mode="IN" name="objectInfo" optional="false" type="String"/>
        <attribute mode="IN" name="dataResourceName" optional="false" type="String"/>
    </service>

    <service name="addImageFrame" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.FrameImage" invoke="addImageFrame" auth="true">
        <description>Create Image Frame For Product.</description>
        <attribute mode="IN" name="productId" optional="false" type="String"/>
        <attribute mode="IN" name="imageName" optional="false" type="String"/>
        <attribute mode="IN" name="imageWidth" optional="false" type="String"/>
        <attribute mode="IN" name="imageHeight" optional="false" type="String"/>
        <attribute mode="IN" name="frameContentId" optional="false" type="String"/>
        <attribute mode="IN" name="frameDataResourceId" optional="false" type="String"/>
    </service>

    <service name="uploadFrame" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.FrameImage" invoke="uploadFrame" auth="true">
        <description>Upload Image Frame.</description>
        <attribute mode="IN" name="uploadedFile" optional="false" type="java.nio.ByteBuffer"/>
    </service>

    <service name="imageCrop" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.CropImage" invoke="imageCrop" auth="true">
        <description>Crop Image</description>
        <attribute mode="IN" name="productId" optional="false" type="String"/>
        <attribute mode="IN" name="imageName" optional="false" type="String"/>
        <attribute mode="IN" name="imageX" optional="false" type="String"/>
        <attribute mode="IN" name="imageY" optional="false" type="String"/>
        <attribute mode="IN" name="imageW" optional="false" type="String"/>
        <attribute mode="IN" name="imageH" optional="false" type="String"/>
    </service>

    <service name="imageRotate" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.RotateImage" invoke="imageRotate" auth="true">
        <description>Rotate Image</description>
        <attribute mode="IN" name="productId" optional="false" type="String"/>
        <attribute mode="IN" name="imageName" optional="false" type="String"/>
        <attribute mode="IN" name="angle" optional="false" type="String"/>
    </service>

    <service name="setImageDetail" engine="groovy" default-entity-name="ProductContent"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="setImageDetail" auth="true">
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <attribute name="sequenceNum" mode="IN" type="Integer" optional="true"/>
        <attribute name="drIsPublic" mode="IN" type="String" optional="true" default-value="N"/>
        <attribute name="description" mode="IN" type="String" optional="true"/>
    </service>

    <service name="updateStatusImageManagement" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="updateStatusImageManagement" auth="true">
        <attribute name="contentId" mode="IN" type="String" optional="false"/>
        <attribute name="checkStatusId" mode="IN" type="String" optional="true"/>
    </service>

    <service name="addRejectedReasonImageManagement" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="addRejectedReasonImageManagement" auth="true">
        <attribute name="contentId" mode="IN" type="String" optional="false"/>
        <attribute name="description" mode="IN" type="String" optional="true"/>
    </service>

    <service name="createImageContentApproval" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="createImageContentApproval" auth="true">
        <attribute name="contentId" mode="IN" type="String" optional="false"/>
    </service>

    <service name="removeImageContentApproval" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="removeImageContentApproval" auth="true">
        <attribute name="partyId" mode="IN" type="String" optional="false"/>
    </service>

    <service name="resizeImages" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="resizeImages" auth="true">
        <description>Resize Images.</description>
        <attribute name="resizeOption" mode="IN" type="String" optional="false"/>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="size" mode="IN" type="String" optional="false"/>
    </service>

    <service name="resizeImageOfProduct" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.ImageManagementServices" invoke="resizeImageOfProduct" auth="true">
        <description>Resize Image Of Product.</description>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="dataResourceName" mode="IN" type="String" optional="false"/>
        <attribute name="resizeWidth" mode="IN" type="String" optional="false"/>
    </service>

    <service name="createNewImageThumbnail" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.ImageManagementServices" invoke="createNewImageThumbnail" auth="true">
        <description>Create New Image Thumbnail.</description>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="contentId" mode="IN" type="String" optional="false"/>
        <attribute name="dataResourceName" mode="IN" type="String" optional="false"/>
        <attribute name="drObjectInfo" mode="IN" type="String" optional="false"/>
        <attribute name="sizeWidth" mode="IN" type="String" optional="false"/>
    </service>

    <service name="removeImageBySize" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/imagemanagement/ImageManagementServicesScript.groovy" invoke="removeImageBySize" auth="true">
        <description>Remove Image By Size.</description>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="mapKey" mode="IN" type="String" optional="false"/>
    </service>

    <service name="replaceImageToExistImage" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.ReplaceImage" invoke="replaceImageToExistImage" auth="true">
        <description>Resize Image Of Product.</description>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="contentIdExist" mode="IN" type="String" optional="false"/>
        <attribute name="contentIdReplace" mode="IN" type="String" optional="false"/>
        <attribute name="dataResourceNameExist" mode="IN" type="String" optional="false"/>
        <attribute name="dataResourceNameReplace" mode="IN" type="String" optional="false"/>
    </service>

    <service name="renameImage" engine="java"
        location="org.apache.ofbiz.product.imagemanagement.ImageManagementServices" invoke="renameImage" auth="true">
        <description>Rename Image.</description>
        <attribute name="productId" mode="IN" type="String" optional="false"/>
        <attribute name="contentId" mode="IN" type="String" optional="false"/>
        <attribute name="drDataResourceName" mode="IN" type="String" optional="false"/>
    </service>

    <!-- Alternative URLs -->
    <service name="createMissingCategoryAndProductAltUrls" engine="groovy"
                location="component://product/src/main/groovy/org/apache/ofbiz/product/product/catalog/CatalogServices.groovy" invoke="createMissingCategoryAndProductAltUrls" auth="true" use-transaction="true">
        <description>Create missing Category and Product Alternative URLs</description>
        <attribute name="prodCatalogId" mode="INOUT" type="String" optional="false"/>
        <attribute name="category" mode="IN" type="String" optional="true"/>
        <attribute name="product" mode="IN" type="String" optional="true"/>
        <attribute name="categoriesNotUpdated" mode="OUT" type="Integer" optional="true"/>
        <attribute name="categoriesUpdated" mode="OUT" type="Integer" optional="true"/>
        <attribute name="productsNotUpdated" mode="OUT" type="Integer" optional="true"/>
        <attribute name="productsUpdated" mode="OUT" type="Integer" optional="true"/>
    </service>

   <service name="createMarketInterest" default-entity-name="MarketInterest" engine="entity-auto" invoke="create" auth="true">
        <description>Create a Market Interest</description>
        <permission-service service-name="productGenericPermission" main-action="CREATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="updateMarketInterest" default-entity-name="MarketInterest" engine="entity-auto" invoke="update" auth="true">
        <description>Update a Market Interest</description>
        <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="deleteMarketInterest" default-entity-name="MarketInterest" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a Market Interest</description>
        <permission-service service-name="productGenericPermission" main-action="DELETE"/>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- Product GroupOrder Services -->
    <service name="createProductGroupOrder" default-entity-name="ProductGroupOrder" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="createProductGroupOrder" auth="true">
        <description>Create ProductGroupOrder</description>
        <auto-attributes include="pk" mode="OUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="updateProductGroupOrder" default-entity-name="ProductGroupOrder" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="updateProductGroupOrder" auth="true">
        <description>Update ProductGroupOrder</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="deleteProductGroupOrder" default-entity-name="ProductGroupOrder" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="deleteProductGroupOrder" auth="true">
        <description>Delete ProductGroupOrder</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createJobForProductGroupOrder" default-entity-name="ProductGroupOrder" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="createJobForProductGroupOrder" auth="true">
        <description>Create Job For ProductGroupOrder</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>

    <service name="checkOrderItemForProductGroupOrder" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="checkOrderItemForProductGroupOrder" auth="true">
        <description>Check OrderItem For ProductGroupOrder</description>
        <attribute name="orderId" mode="IN" type="String" optional="false"/>
    </service>

    <service name="cancleOrderItemGroupOrder" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="cancleOrderItemGroupOrder" auth="true">
        <description>Cancle OrderItemGroupOrder</description>
        <attribute name="orderId" mode="IN" type="String" optional="false"/>
        <attribute name="orderItemSeqId" type="String" mode="IN" optional="true"/>
    </service>

    <service name="checkProductGroupOrderExpired" engine="groovy"
        location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="checkProductGroupOrderExpired" auth="true">
        <description>Check ProductGroupOrder Expired</description>
        <attribute name="groupOrderId" mode="IN" type="String" optional="false"/>
    </service>

    <service name="createGoodIdentificationType" default-entity-name="GoodIdentificationType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a GoodIdentificationType</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
    </service>
    <service name="updateGoodIdentificationType" default-entity-name="GoodIdentificationType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a GoodIdentificationType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteGoodIdentificationType" default-entity-name="GoodIdentificationType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a GoodIdentificationType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createProdCatalogCategoryType" default-entity-name="ProdCatalogCategoryType" engine="entity-auto" invoke="create" auth="true">
        <description>Create ProdCatalogCategoryType Record</description>
        <auto-attributes mode="INOUT" include="pk" optional="true"/>
        <auto-attributes mode="IN" include="nonpk" optional="true"/>
    </service>
    <service name="updateProdCatalogCategoryType" default-entity-name="ProdCatalogCategoryType" engine="entity-auto" invoke="update" auth="true">
        <description>Update ProdCatalogCategoryType record</description>
        <auto-attributes include="pk" mode="IN"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProdCatalogCategoryType" default-entity-name="ProdCatalogCategoryType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete ProdCatalogCategoryType Record</description>
        <auto-attributes mode="IN" include="pk"/>
    </service>

    <service name="createProductAssocType" default-entity-name="ProductAssocType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductAssocType</description>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductAssocType" default-entity-name="ProductAssocType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductAssocType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductAssocType" default-entity-name="ProductAssocType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductAssocType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductCategoryContentType services -->
    <service name="createProductCategoryContentType" default-entity-name="ProductCategoryContentType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductCategoryContentType</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
    </service>
    <service name="updateProductCategoryContentType" default-entity-name="ProductCategoryContentType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductCategoryContentType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductCategoryContentType" default-entity-name="ProductCategoryContentType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductCategoryContentType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductCategoryType services -->
    <service name="createProductCategoryType" default-entity-name="ProductCategoryType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductCategoryType</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
    </service>
    <service name="updateProductCategoryType" default-entity-name="ProductCategoryType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a GlFiscalType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductCategoryType" default-entity-name="ProductCategoryType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductCategoryType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductCategoryTypeAttr services -->
    <service name="createProductCategoryTypeAttr" default-entity-name="ProductCategoryTypeAttr" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductCategoryTypeAttr</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
    </service>
    <service name="updateProductCategoryTypeAttr" default-entity-name="ProductCategoryTypeAttr" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductCategoryTypeAttr</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductCategoryTypeAttr" default-entity-name="ProductCategoryTypeAttr" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductCategoryTypeAttr</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductContentType services -->
    <service name="createProductContentType" default-entity-name="ProductContentType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductContentType</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
    </service>
    <service name="updateProductContentType" default-entity-name="ProductContentType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductContentType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductContentType" default-entity-name="ProductContentType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductContentType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductMaintType services -->
    <service name="createProductMaintType" default-entity-name="ProductMaintType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductMaintType</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
    </service>
    <service name="updateProductMaintType" default-entity-name="ProductMaintType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductMaintType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductMaintType" default-entity-name="ProductMaintType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductMaintType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <!-- ProductMeterType services -->
    <service name="createProductMeterType" default-entity-name="ProductMeterType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductMeterType</description>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
    </service>
    <service name="updateProductMeterType" default-entity-name="ProductMeterType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductMeterType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductMeterType" default-entity-name="ProductMeterType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductMeterType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createProductType" default-entity-name="ProductType" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductType</description>
        <auto-attributes include="pk" mode="INOUT" optional="true"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductType" default-entity-name="ProductType" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductType" default-entity-name="ProductType" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductType</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createProductTypeAttr" default-entity-name="ProductTypeAttr" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProductTypeAttr</description>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProductTypeAttr" default-entity-name="ProductTypeAttr" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProductTypeAttr</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="deleteProductTypeAttr" default-entity-name="ProductTypeAttr" engine="entity-auto" invoke="delete" auth="true">
        <description>Delete a ProductTypeAttr</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
    </service>

    <service name="createProdCatalogInvFacility" default-entity-name="ProdCatalogInvFacility" engine="entity-auto" invoke="create" auth="true">
        <description>Create a ProdCatalogInvFacility</description>
        <auto-attributes include="pk" mode="INOUT" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="updateProdCatalogInvFacility" default-entity-name="ProdCatalogInvFacility" engine="entity-auto" invoke="update" auth="true">
        <description>Update a ProdCatalogInvFacility</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
    </service>
    <service name="expireProdCatalogInvFacility" default-entity-name="ProdCatalogInvFacility" engine="entity-auto" invoke="expire" auth="true">
        <description>Expire a ProdCatalogInvFacility Record</description>
        <auto-attributes mode="IN" include="pk"/>
    </service>

    <!--Permission services -->

    <service name="checkProductRelatedPermission" engine="groovy"
             location="component://product/src/main/groovy/org/apache/ofbiz/product/product/product/ProductServicesScript.groovy" invoke="checkProductRelatedPermissionService">
        <description>Check Product Related Permission, a service to centralize product security code</description>
        <implements service="permissionInterface"/>
        <attribute name="productId" mode="IN" type="String" optional="true"/>
    </service>
</services>
