<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<xs:schema xmlns="urn:jboss:domain:deployment-scanner:1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:jboss:domain:deployment-scanner:1.1" version="1.1">

    <!-- The threads subsystem root element -->
    <xs:element name="subsystem" type="subsystem"/>

    <xs:complexType name="subsystem">
        <xs:annotation>
            <xs:documentation>
                <![CDATA[
                The filesystem deployment scanner subsystem configuration.
                ]]>
            </xs:documentation>
        </xs:annotation>
        <xs:choice maxOccurs="unbounded" minOccurs="0">
            <xs:element maxOccurs="unbounded" minOccurs="0" name="deployment-scanner" type="standalone-deployment-scanner-type"/>
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="standalone-deployment-scanner-type">
        <xs:annotation>
            <xs:documentation>Allows configuration of an additional location where deployment
                content can be stored.
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="name" type="xs:string" use="optional" default="default" />
        <xs:attribute name="path" use="required">
            <xs:annotation>
                <xs:documentation>The actual filesystem path. Treated as an absolute path, unless the
                'relative-to' attribute is specified, in which case the value
                is treated as relative to that path.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="relative-to" type="xs:string" use="optional">
           <xs:annotation>
                <xs:documentation>Reference to a filesystem path defined in the "paths" section
                of the server configuration.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scan-enabled" type="xs:boolean" use="optional" default="true">
            <xs:annotation>
                <xs:documentation>
                    Flag indicating that all scanning (including initial scanning at startup)
                    should be disabled.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scan-interval" type="xs:int" use="optional" default="0">
            <xs:annotation>
                <xs:documentation>Periodic interval, in milliseconds, at which the repository
                    should be scanned for changes. A value of less than 1 indicates the
                    repository should only be scanned at initial startup.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="auto-deploy-zipped" type="xs:boolean" use="optional" default="true">
            <xs:annotation>
                <xs:documentation>
                    Controls whether zipped deployment content should be automatically deployed by
                    the scanner without requiring the user to add a .dodeploy marker file.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="auto-deploy-exploded" type="xs:boolean" use="optional" default="false">
            <xs:annotation>
                <xs:documentation>
                    Controls whether exploded deployment content should be automatically deployed by
                    the scanner without requiring the user to add a .dodeploy marker file. Setting
                    this to 'true' is not recommended for anything but basic development scenarios,
                    as there is no way to ensure that deployment will not occur in the middle of
                    changes to the content.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="auto-deploy-xml" type="xs:boolean" use="optional" default="true">
            <xs:annotation>
                <xs:documentation>
                    Controls whether xml deployment content should be automatically deployed by
                    the scanner without requiring the user to add a .dodeploy marker file.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="deployment-timeout" type="xs:int" use="optional" default="600">
            <xs:annotation>
                <xs:documentation>
                   Timeout used, in seconds, for deployment operations.  If an individual deployment operation
                   takes longer than this timeout it will be canceled and marked as failed.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

</xs:schema>
