ilscipio/scipio-erp

View on GitHub
framework/webtools/servicedef/services.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>OFBiz WebTools Services</description>
    <vendor>OFBiz</vendor>
    <version>1.0</version>

    <service name="commonEntityImportInterface" engine="interface"><!-- SCIPIO: 2018-09-17 -->
        <attribute name="allowEntity" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: Allow entity names, exception on violations. Replaces "allowedEntityNames". Added 2018-09-17.</description>
        </attribute>
        <attribute name="allowedEntityNames" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: DEPRECATED, use allowEntity instead. Added 2017-06-15.</description>
        </attribute>
        <attribute name="disallowEntity" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: Disallow entity names, exception on violations. Added 2018-09-17.</description>
        </attribute>
        <attribute name="allowEntityWarn" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: Allow entity names, violations warned. Added 2018-09-17.</description>
        </attribute>
        <attribute name="disallowEntityWarn" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: Disallow entity names, violations warned. Added 2018-09-17.</description>
        </attribute>
        <attribute name="includeEntity" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: Include entity names, violations ignored. Added 2018-09-17.</description>
        </attribute>
        <attribute name="excludeEntity" type="java.util.Set" mode="IN" optional="true">
            <description>SCIPIO: Exclude entity names, violations ignored. Added 2018-09-17.</description>
        </attribute>
        <attribute name="disallowUnsafeEntityWarn" type="Boolean" mode="IN" optional="true">
            <description>SCIPIO: Disallow dangerous entity names, violations warned. Default: false. Added 2018-09-17.</description>
        </attribute>
    </service>

    <!-- Entity Import Services
         Transacitons are turned off for these services because they set transactions and timeouts inside the services with txTimeout parameter -->
    <service name="parseEntityXmlFile" engine="java"
            location="org.ofbiz.webtools.WebToolsServices" invoke="parseEntityXmlFile" auth="true" use-transaction="false">
        <description>Parses an entity xml file or an entity xml text</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <implements service="commonEntityImportInterface"/><!-- SCIPIO: 2018-09-17 -->
        <attribute name="url" type="java.net.URL" mode="IN" optional="true"/>
        <attribute name="xmltext" type="String" mode="IN" optional="true" allow-html="any"/>
        <attribute name="mostlyInserts" type="String" mode="IN" optional="true"/>
        <attribute name="maintainTimeStamps" type="String" mode="IN" optional="true"/>
        <attribute name="txTimeout" type="Integer" mode="IN" optional="true"/>
        <attribute name="createDummyFks" type="String" mode="IN" optional="true"/>
        <attribute name="checkDataOnly" type="String" mode="IN" optional="true"/>
        <attribute name="placeholderValues" type="java.util.Map" mode="IN" optional="true"/>
        <attribute name="rowProcessed" type="Long" mode="OUT" optional="false"/>
    </service>
    <service name="entityImport" engine="java"
            location="org.ofbiz.webtools.WebToolsServices" invoke="entityImport" auth="true" use-transaction="false">
        <description>Imports an entity xml file or text string</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <implements service="uploadFileInterface"/><!-- SCIPIO: 2017-06-15: now supports single file upload -->
        <implements service="commonEntityImportInterface"/><!-- SCIPIO: 2018-09-17 -->
        <attribute name="filename" type="String" mode="IN" optional="true" allow-html="any"/>
        <attribute name="fmfilename" type="String" mode="IN" optional="true" allow-html="any"/>
        <attribute name="fulltext" type="String" mode="IN" optional="true" allow-html="any"/>
        <attribute name="isUrl" type="String" mode="IN" optional="true"/>
        <attribute name="mostlyInserts" type="String" mode="IN" optional="true"/>
        <attribute name="maintainTimeStamps" type="String" mode="IN" optional="true"/>
        <attribute name="createDummyFks" type="String" mode="IN" optional="true"/>
        <attribute name="checkDataOnly" type="String" mode="IN" optional="true"/>
        <attribute name="txTimeout" type="Integer" mode="IN" optional="true"/>
        <attribute name="placeholderValues" type="java.util.Map" mode="IN" optional="true"/>
        <attribute name="messages" type="List" mode="OUT" optional="false"/>
    </service>    
    <service name="entityImportDir" engine="java"
            location="org.ofbiz.webtools.WebToolsServices" invoke="entityImportDir" auth="true" use-transaction="false">
        <description>Imports all entity xml files contained in a directory</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <implements service="commonEntityImportInterface"/><!-- SCIPIO: 2018-09-17 -->
        <attribute name="path" type="String" mode="IN" optional="true"/>
        <attribute name="mostlyInserts" type="String" mode="IN" optional="true"/>
        <attribute name="maintainTimeStamps" type="String" mode="IN" optional="true"/>
        <attribute name="createDummyFks" type="String" mode="IN" optional="true"/>
        <attribute name="checkDataOnly" type="String" mode="IN" optional="true"/>
        <attribute name="deleteFiles" type="String" mode="IN" optional="true"/>
        <attribute name="txTimeout" type="Integer" mode="IN" optional="true"/>
        <attribute name="filePause" type="Long" mode="IN" optional="true"/>
        <attribute name="placeholderValues" type="java.util.Map" mode="IN" optional="true"/>
        <attribute name="messages" type="List" mode="OUT" optional="false"/>
    </service>
    <service name="entityImportReaders" engine="java"
        location="org.ofbiz.webtools.WebToolsServices" invoke="entityImportReaders" auth="true" use-transaction="false">
        <description>Imports an entity xml file or text string</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <!-- SCIPIO: TODO: not supported in the implementation easily yet
        <implements service="commonEntityImportInterface"/>-->
        <attribute name="readers" type="String" mode="IN" optional="true"/>
        <attribute name="overrideDelegator" type="String" mode="IN" optional="true"/>
        <attribute name="overrideGroup" type="String" mode="IN" optional="true"/>
        <attribute name="mostlyInserts" type="String" mode="IN" optional="true"/>
        <attribute name="maintainTimeStamps" type="String" mode="IN" optional="true"/>
        <attribute name="createDummyFks" type="String" mode="IN" optional="true"/>
        <attribute name="checkDataOnly" type="String" mode="IN" optional="true"/>
        <attribute name="txTimeout" type="Integer" mode="IN" optional="true"/>
        <attribute name="messages" type="List" mode="OUT" optional="false"/>
    </service>
    <service name="entityExportAll" engine="java"
            location="org.ofbiz.webtools.WebToolsServices" invoke="entityExportAll" auth="true" use-transaction="false">
        <description>Exports all entities into xml files</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <attribute name="outpath" type="String" mode="IN" optional="true"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="txTimeout" type="Integer" mode="IN" optional="true"/>
        <attribute name="results" type="List" mode="OUT" optional="false"/>
    </service>

    <service name="getEntityRefData" engine="java" location="org.ofbiz.webtools.WebToolsServices" invoke="getEntityRefData" auth="true" use-transaction="false">
        <description>Gets the entity reference data - for the entity reference screen. See org.ofbiz.webtools.WebToolsServices.getEntityRefData().</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <attribute name="numberOfEntities" type="java.lang.Integer" mode="OUT" optional="true"/>
        <attribute name="packagesList" type="java.util.List" mode="OUT" optional="true"/>
    </service>
    <service name="exportEntityEoModelBundle" engine="java" location="org.ofbiz.webtools.WebToolsServices" invoke="exportEntityEoModelBundle" auth="true" use-transaction="false">
        <description>Saves specified set of entities to an Apple EOModelBundle file.
            See org.ofbiz.webtools.WebToolsServices.exportEoModelBundle().
            Specify either entityPackageName or entityGroupId, or leave both empty for ALL entities in the data model.
        </description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <attribute name="eomodeldFullPath" type="java.lang.String" mode="IN" optional="false"/>
        <attribute name="entityPackageName" type="java.lang.String" mode="IN" optional="true"/>
        <attribute name="entityGroupId" type="java.lang.String" mode="IN" optional="true"/>
        <attribute name="datasourceName" type="java.lang.String" mode="IN" optional="true"/>
        <attribute name="entityNamePrefix" type="java.lang.String" mode="IN" optional="true"/>
    </service>

    <service name="entityMaintPermCheck" engine="java" location="org.ofbiz.webtools.WebToolsServices" invoke="entityMaintPermCheck">
        <description>Performs an entity maintenance security check. Returns hasPermission=true
          if the user has the ENTITY_MAINT permission.</description>
        <implements service="permissionInterface"/>
    </service>

    <service name="exportServiceEoModelBundle" engine="java" location="org.ofbiz.webtools.WebToolsServices" invoke="exportServiceEoModelBundle" auth="true" use-transaction="false">
        <description>Saves service and related artifacts diagram to an Apple EOModelBundle file.
        </description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <attribute name="eomodeldFullPath" type="java.lang.String" mode="IN" optional="false"/>
        <attribute name="serviceName" type="java.lang.String" mode="IN" optional="false"/>
    </service>

    <service name="saveLabelsToXmlFile" engine="java" location="org.ofbiz.webtools.labelmanager.SaveLabelsToXmlFile"
             invoke="saveLabelsToXmlFile" auth="true" use-transaction="false">
        <description>Save labels to xml file</description>
        <attribute name="key" type="String" mode="IN" optional="true"/>
        <attribute name="keyComment" type="String" mode="IN" optional="true"/>
        <attribute name="update_label" type="String" mode="IN" optional="false"/>
        <attribute name="fileName" type="String" mode="IN" optional="false"/>
        <attribute name="confirm" type="String" mode="IN" optional="true"/>
        <attribute name="removeLabel" type="String" mode="IN" optional="true"/>
        <attribute name="localeNames" type="List" mode="IN" optional="true"/>
        <attribute name="localeValues" type="List" mode="IN" optional="true"/>
        <attribute name="localeComments" type="List" mode="IN" optional="true"/>
    </service>
    
    <!-- SCIPIO Services -->
    <service name="getServerRequests" engine="groovy" location="component://webtools/script/com/ilscipio/data/ServerData.groovy" 
             invoke="getServerRequests" auth="true" log="quiet">
        <description>Returns a list of Maps, containing the contentIds (List of requested paths) and hitcount (number of requests) grouped by DateInterval</description>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="false">
            <description>NOTE: fromDate is used as the base date from which to determine the buckets using bucketMinutes, so the value should usually
                be aligned to the last bucket, otherwise some ServetHits may be missed.</description>
        </attribute>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/>
        <attribute name="dateInterval" type="String" mode="IN" optional="true"/><!-- Group results by minute|hour|day|week|month|year defaults:day-->
        <attribute name="bucketMinutes" type="Integer" mode="IN" optional="true">
            <description>Causes final results to be bucketed every 5, 10, 15, etc. minutes as specified (0-based)</description>
        </attribute>
        <attribute name="serverHostName" type="String" mode="IN" optional="true"/>
        <attribute name="requests" type="Map" mode="OUT" optional="true">
            <description>NOTE: If serverHostName is false (consult all servers), this contains the sum of all serverRequests for each summer</description>
        </attribute>
        <attribute name="serverRequests" type="Map" mode="OUT" optional="true">
            <description>Maps serverHostName to requests maps - only meaningfull if serverHostName is left empty (all servers)</description>
        </attribute>
    </service>
    <service name="getServerRequestsThisHour" engine="groovy" location="component://webtools/script/com/ilscipio/data/ServerData.groovy" 
             invoke="getServerRequestsThisHour" auth="true">
        <description>Returns a list of Maps, containing the contentIds (List of requested paths) and hitcount (number of requests) grouped by minute</description>
        <attribute name="requests" type="Map" mode="OUT" optional="true"/>
    </service>
    <service name="getServerRequestsToday" engine="groovy" location="component://webtools/script/com/ilscipio/data/ServerData.groovy" 
             invoke="getServerRequestsToday" auth="true">
        <description>Returns a list of Maps, containing the contentIds (List of requested paths) and hitcount (number of requests) grouped by hour</description>
        <attribute name="requests" type="Map" mode="OUT" optional="true"/>
    </service>
    <service name="getServerRequestsThisWeek" engine="groovy" location="component://webtools/script/com/ilscipio/data/ServerData.groovy" 
             invoke="getServerRequestsThisWeek" auth="true">
        <description>Returns a list of Maps, containing the contentIds (List of requested paths) and hitcount (number of requests) grouped by day</description>
        <attribute name="requests" type="Map" mode="OUT" optional="true"/>
    </service>
    <service name="getServerRequestsThisMonth" engine="groovy" location="component://webtools/script/com/ilscipio/data/ServerData.groovy" 
             invoke="getServerRequestsThisMonth" auth="true">
        <description>Returns a list of Maps, containing the contentIds (List of requested paths) and hitcount (number of requests) grouped by month</description>
        <attribute name="requests" type="Map" mode="OUT" optional="true"/>
    </service>
    <service name="getServerRequestsThisYear" engine="groovy" location="component://webtools/script/com/ilscipio/data/ServerData.groovy" 
             invoke="getServerRequestsThisYear" auth="true">
        <description>Returns a list of Maps, containing the contentIds (List of requested paths) and hitcount (number of requests) grouped by year</description>
        <attribute name="requests" type="Map" mode="OUT" optional="true"/>
    </service>

    <service name="getEntityExport" engine="java" location="com.ilscipio.scipio.webtools.WebToolsServices"
         invoke="getEntityExport" auth="true" use-transaction="false">
        <description>Generates a ZIP file, comprising of a database dump for selected entities. File is stored in the entity 'EntityExport' for future use.</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <attribute name="entityList" type="List" mode="IN" optional="false">
            <description>List of entity-names</description>
        </attribute>
        <attribute name="description" type="String" mode="IN" optional="true"/>
        <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
        <attribute name="exportId" type="String" mode="OUT" optional="false"/>
    </service>
    
    <service name="deleteEntityExport" engine="entity-auto" default-entity-name="EntityExport" invoke="delete" auth="true">
        <permission-service service-name="entityMaintPermCheck" main-action="DELETE"/>
        <attribute name="exportId" mode="IN" type="String" optional="false"/>
    </service>
    
    <service name="validateSystemLocations" engine="java" location="com.ilscipio.scipio.webtools.WebToolsServices" invoke="validateSystemLocations" 
        auth="true" use-transaction="false">
        <description>Tool to verify that a bunch of paths actually exist in the system, to detect problems (SCIPIO)</description>
        <permission-service service-name="entityMaintPermCheck" main-action="VIEW"/>
        <attribute name="pathList" mode="IN" type="List" optional="true"/>
        <attribute name="paths" mode="IN" type="String" optional="true" allow-html="any"/>
        <attribute name="classNameList" mode="IN" type="List" optional="true"/>
        <attribute name="classNames" mode="IN" type="String" optional="true" allow-html="any"/>
        <attribute name="pathResults" mode="OUT" type="List" optional="true"/>
        <attribute name="classNameResults" mode="OUT" type="List" optional="true"/>
    </service>

    <!-- Import/Export -->
    <service name="excelI18nImport" engine="java" log="quiet" hideResultInLog="true" log-eca="quiet"
             location="com.ilscipio.scipio.util.CatalogImportExportServices" invoke="excelI18nImport" auth="false"
             use-transaction="false">
        <description>Update or create category content based on an Excel file</description>
        <implements service="uploadFileInterface" optional="true"/>
        <attribute name="serviceMode" type="String" mode="IN" optional="true" default-value="sync">
            <description>One of: sync, async, async-persist</description>
        </attribute>
        <attribute name="startRow" type="Integer" mode="IN" optional="true"/>
        <attribute name="endRow" type="Integer" mode="IN" optional="true"/>
        <attribute name="templateName" type="String" mode="IN" optional="false"/>
        <attribute name="logLevel" type="String" mode="IN" optional="true" default-value="info">
            <description>Service-relative log level; pne of: info, verbose, important, warning</description>
        </attribute>
    </service>
</services>