<schema>
  <description>
    SchoolTool configuration schema.

    This schema describes the configuration options available for SchoolTool
    HTTP server.
  </description>

  <import package="ZODB" />

  <section type="zodb.database" name="*" required="yes" attribute="database">
    <description>
      The main application database that should be used.
    </description>
    <example>
      &lt;zodb&gt;
        &lt;filestorage&gt;
          path Data.fs
        &lt;/filestorage&gt;
      &lt;/zodb&gt;
    </example>
  </section>

  <multikey name="listen" datatype="inet-address">
    <description>
      Network interface and port number the HTTP server should listen on.

      Network interface can be omitted and just the port number specified.
    </description>
    <example>
      listen 8080
      listen 127.0.0.1:80
    </example>
  </multikey>

  <multikey name="web" datatype="inet-address">
    <description>
      Network interface and port number the web server should listen on.

      Network interface can be omitted and just the port number specified.
    </description>
    <example>
      web 80
      web 127.0.0.1:80
    </example>
  </multikey>

  <multikey name="listen_ssl" datatype="inet-address">
    <description>
      Network interface and port number the HTTPS server should listen on.

      Network interface can be omitted and just the port number specified.
    </description>
    <example>
      listen_ssl 8080
      listen_ssl 127.0.0.1:80
    </example>
  </multikey>

  <multikey name="web_ssl" datatype="inet-address">
    <description>
      Network interface and port number the ssl web server should listen on.

      Network interface can be omitted and just the port number specified.
    </description>
    <example>
      web_ssl 8080
      web_ssl 127.0.0.1:80
    </example>
  </multikey>

  <key name="ssl_certificate" datatype="string">
    <description>
      PEM Certificate
    </description>
  </key>

  <key name="thread-pool-size" datatype="integer" default="10">
    <description>
      Suggested thread pool size.
    </description>
    <example>
      thread-pool-size 20
    </example>
  </key>

  <key name="event-logging" datatype="boolean" default="off">
    <description>
      Enables or disables global event logging to /utils/eventlog.
    </description>
    <example>
      event-logging on
    </example>
  </key>

  <key name="pid-file" datatype="string">
    <description>
      Specifies the path of a pid file.
    </description>
    <example>
      pid-file /var/run/schooltool.pid
    </example>
  </key>

  <multikey name="error-log-file" datatype="string">
    <description>
      Specifies the path of a log file used for exceptions. Special
      values STDERR and STDOUT mean standard error and standard output
      respectively.
    </description>
    <default>STDERR</default>
    <example>
      error-log-file /var/log/schooltool/error.log
      error-log-file STDERR
    </example>
  </multikey>

  <multikey name="web-access-log-file" datatype="string">
    <description>
      Specifies the path of a file used for an Apache combined format
      access log for the web application interface.  Special values
      STDERR and STDOUT mean standard error and standard output
      respectively.
    </description>
    <default>STDOUT</default>
    <example>
      access-log-file /var/log/schooltool/web-access.log
      access-log-file STDOUT
    </example>
  </multikey>

  <multikey name="attendance-log-file" datatype="string">
    <description>
      Specifies the path of a file used for the attendance log.
      Special values STDERR and STDOUT mean standard error and standard
      output respectively.

      This option is obsolete.
    </description>
    <example>
      attendance-log-file /var/log/schooltool/attendance.log
    </example>
  </multikey>

  <key name="lang" datatype="string" default="auto">
    <description>
      Specifies the locale of the messages to be used on the server.

      If 'auto' is set, the language is chosen according to the user's
      preference specified in the web browser configuration.
    </description>
    <example>
      lang en_US
    </example>
  </key>

  <key name="reportlab_fontdir" datatype="string">
    <description>
      Specifies the path to TrueType fonts (Liberation)
      for reportlab.

      Comment out to disable reportlab.
    </description>
    <example>
      reportlab_fontdir /usr/share/fonts/truetype/ttf-liberation
    </example>
  </key>

  <key name="devmode" datatype="boolean">
    <description>
      Switches the Developer Mode on and off.

      In developer mode, the Web UI will provide usefull utilities for
      developers to work on schooltool applications.
    </description>
    <example>
      devmode on
    </example>
    <metadefault>off</metadefault>
  </key>

  <key name="site-definition" default="site.zcml">
    <description>
      The name of the top-level ZCML file that defines the component
      configuration used for this site.
    </description>
    <example>
      site-definition site.zcml
    </example>
  </key>

  <key name="school-type" default="">
    <description>
      The school type to be used when initializing the database.

      This option is obsolete.
    </description>
    <example>
      school-type lyceum
    </example>
  </key>

  %(plugins)s

</schema>
