ilscipio/scipio-erp

View on GitHub
applications/product/servicedef/services_view.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

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

    <!-- Product View Services -->
    <service name="getProduct" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodFindProduct" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a product value object.</description>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="product" type="org.ofbiz.entity.GenericValue" mode="OUT"/>
    </service>
    <service name="getProductVariant" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodFindSelectedVariant" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a list of variant product value objects.</description>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="selectedFeatures" type="java.util.Map" mode="IN"/>
        <attribute name="products" type="java.util.List" mode="OUT"/>
    </service>
    <service name="getProductFeatureSet" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodFindFeatureTypes" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a Set of product features (distinct)</description>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="productFeatureApplTypeId" type="String" mode="IN" optional="true"/>
        <attribute name="emptyAction" type="String" mode="IN" optional="true">
            <description>SCIPIO: If result empty, emptyAction determines handling. 
                Possible values: "warn" (current default - stock), "success", "fail", "error".</description>
        </attribute>
        <attribute name="useCache" type="Boolean" mode="IN" optional="true" default-value="true">
            <description>SCIPIO: explicit use entity cache control (default: true) (2017-12-20)</description>
        </attribute>
        <attribute name="featureSet" type="java.util.Set" mode="OUT"/>
    </service>
    <service name="getProductVariantTree" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodMakeFeatureTree" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a tree of product variants based on a virtual product and a list of features.</description>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="featureOrder" type="java.util.Collection" mode="IN"/>
        <attribute name="productStoreId" type="String" mode="IN" optional="true"/>
        <attribute name="checkInventory" type="Boolean" mode="IN" default-value="true" optional="true"/>
        <attribute name="unavailableInTree" type="Boolean" mode="IN" default-value="false" optional="true">
            <description>If true, out-of-stock items are included in the returned variantTree (SCIPIO)</description>
        </attribute>
        <attribute name="variantTree" type="java.util.Map" mode="OUT" optional="true"/>
        <attribute name="unavailableVariants" type="java.util.List" mode="OUT" optional="true"/>
        <attribute name="variantSample" type="java.util.Map" mode="OUT" optional="true"/>
        <attribute name="virtualVariant" type="java.util.List" mode="OUT" optional="true"/>
    </service>
    <service name="getAllProductVariants" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodFindAllVariants" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a Collection of products from a 'virtual' parent product.</description>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="assocProducts" type="java.util.Collection" mode="OUT"/>
    </service>
    <service name="getAssociatedProducts" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodFindAssociatedByType" log="quiet"><!-- SCIPIO: quiet -->
        <description>
            Finds associated products by the defined type.  Only one of either productId or productIdTo can be supplied,
            not both.  If bidirectional is set to true then the passed in productId will be treated as both a productId
            and a productIdTo (defaults to false).  If sortDescending is true then assocProducts will be returned sorted
            by sequenceNum descending (defaults to false).
        </description>
        <attribute name="productId" type="String" mode="IN" optional="true"/>
        <attribute name="productIdTo" type="String" mode="IN" optional="true"/>
        <attribute name="checkViewAllow" type="Boolean" mode="IN" optional="true"/>
        <attribute name="prodCatalogId" type="String" mode="IN" optional="true"/>
        <attribute name="type" type="String" mode="IN"/>
        <attribute name="bidirectional" type="Boolean" mode="IN" optional="true"/>
        <attribute name="sortDescending" type="Boolean" mode="IN" optional="true"/>
        <attribute name="assocProducts" type="java.util.Collection" mode="OUT" optional="true"/>
    </service>
    <service name="getProductFeatures" engine="java"
            location="org.ofbiz.product.product.ProductServices" invoke="prodGetFeatures" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a Collection of product features (ProductFeatureAndAppl) for a product.</description>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="type" type="String" mode="IN" optional="true"/>
        <attribute name="distinct" type="String" mode="IN" optional="true"/>
        <attribute name="productFeatures" type="java.util.Collection" mode="OUT"/>
    </service>
    <service name="getSuppliersForProduct" engine="java"
            location="org.ofbiz.product.supplier.SupplierProductServices" invoke="getSuppliersForProduct" log="quiet"><!-- SCIPIO: quiet -->
        <description>Finds a list of SupplierProduct entity values based on a productId.
              If other parameters are given, they are used to filter the list down.</description>
        <attribute name="productId" type="String" mode="IN" optional="false"/>
        <attribute name="partyId" type="String" mode="IN" optional="true"/>
        <attribute name="currencyUomId" type="String" mode="IN" optional="true"/>
        <attribute name="quantity" type="BigDecimal" mode="IN" optional="true"/>
        <attribute name="canDropShip" type="String" mode="IN" optional="true"/>
        <attribute name="useCache" type="Boolean" mode="IN" optional="true" default-value="true">
            <description>SCIPIO: useCache flag (default: true) - this should be set to false if called during updated services! (added 2017-12-19)</description>
        </attribute>
        <attribute name="supplierProducts" type="java.util.List" mode="OUT" optional="false"/>
    </service>
    <service name="convertFeaturesForSupplier" engine="java"
        location = "org.ofbiz.product.supplier.SupplierProductServices" invoke="convertFeaturesForSupplier">
        <description>Takes a list of product feature (either ProductFeature or ProductFeatureAndAppl) and converts
            each one for the supplier specified by partyId, changing the description and idCode</description>
        <attribute type="java.util.Collection" mode="IN" name="productFeatures" optional="false"/>
        <attribute type="String" mode="IN" name="partyId" optional="false"/>
        <attribute type="java.util.Collection" mode="OUT" name="convertedProductFeatures"/>
    </service>

    <!-- Category View Services -->
    <service name="getProductCategoryMembers" engine="java"
            location="org.ofbiz.product.category.CategoryServices" invoke="getCategoryMembers" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets ProductCategoryMembers for the category_id</description>
        <attribute name="categoryId" type="String" mode="IN"/>
        <attribute name="category" type="org.ofbiz.entity.GenericValue" mode="OUT"/>
        <attribute name="categoryMembers" type="java.util.Collection" mode="OUT"/>
    </service>
    
    <service name="getAssociatedProductsList" engine="simple" auth="false"
        location="component://product/script/org/ofbiz/product/category/CategoryServices.xml" invoke="getAssociatedProductsList" log="quiet"><!-- SCIPIO: quiet -->
        <description>Set the product options for selected product category, mostly used by getDependentDropdownValues</description>
        <attribute name="productCategoryId" mode="IN" type="String" optional="false"/>
        <attribute name="products" mode="OUT" type="java.util.List"/>
    </service>
    
    <service name="getPreviousNextProducts" engine="java"
        location="org.ofbiz.product.category.CategoryServices" invoke="getPreviousNextProducts" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets the previous and next product Ids.</description>
        <attribute name="categoryId" type="String" mode="IN"/>
        <attribute name="productId" type="String" mode="IN"/>
        <attribute name="activeOnly" type="Boolean" mode="IN" optional="true"/>
        <attribute name="introductionDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/>
        <attribute name="releaseDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/>
        <attribute name="orderByFields" type="List" mode="IN" optional="true"/>
        <attribute name="category" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
        <attribute name="previousProductId" type="String" mode="OUT" optional="true"/>
        <attribute name="nextProductId" type="String" mode="OUT" optional="true"/>
    </service>
    <service name="getProductCategoryAndLimitedMembers" engine="java"
            location="org.ofbiz.product.category.CategoryServices" invoke="getProductCategoryAndLimitedMembers" log="quiet"><!-- SCIPIO: quiet -->
        <description>Gets a productCategory and a Collection of associated productCategoryMembers and calculates limiting parameters</description>
        <attribute name="productCategoryId" type="String" mode="IN" optional="false"/>
        <attribute name="prodCatalogId" type="String" mode="IN" optional="true"/>
        <attribute name="defaultViewSize" type="Integer" mode="IN" optional="false"/>
        <attribute name="limitView" type="Boolean" mode="IN" optional="false"/>
        <attribute name="checkViewAllow" type="Boolean" mode="IN" optional="true"/>
        <attribute name="viewIndexString" type="String" mode="IN" optional="true"/>
        <attribute name="viewSizeString" type="String" mode="IN" optional="true"/>
        <attribute name="useCacheForMembers" type="Boolean" mode="IN" optional="true"/>
        <attribute name="activeOnly" type="Boolean" mode="IN" optional="true"/>
        <attribute name="introductionDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/>
        <attribute name="releaseDateLimit" type="java.sql.Timestamp" mode="IN" optional="true"/>
        <attribute name="orderByFields" type="List" mode="IN" optional="true"/>
        <attribute name="productStoreId" mode="IN" type="String" optional="true"/>
        <attribute name="productCategory" type="org.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
        <attribute name="productCategoryMembers" type="java.util.Collection" mode="OUT" optional="true"/> <!-- this list will only contain the limited members if limitView=true -->
        <attribute name="viewIndex" type="Integer" mode="OUT" optional="false"/> <!-- this is a 1 based index, ie the first results are in index 1 -->
        <attribute name="viewSize" type="Integer" mode="OUT" optional="false"/>
        <attribute name="lowIndex" type="Integer" mode="OUT" optional="false"/>
        <attribute name="highIndex" type="Integer" mode="OUT" optional="false"/>
        <attribute name="listSize" type="Integer" mode="OUT" optional="false"/>
    </service>
</services>