<?xml version="1.0" encoding="utf-8"?>
<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    i18n_domain="schooltool.intervention">

  <!-- Pluggable traverser plugins for HTTP paths -->
  <adapterTraverserPlugin
      for="schooltool.app.interfaces.ISchoolToolApplication"
      layer="zope.publisher.interfaces.http.IHTTPRequest"
      name="intervention"
      adapter="schooltool.intervention.interfaces.IInterventionSchoolYear"
      />
  <view
      for="schooltool.intervention.interfaces.IInterventionMarker"
      type="zope.publisher.interfaces.http.IHTTPRequest"
      provides="zope.publisher.interfaces.http.IHTTPPublisher"
      factory="schooltool.traverser.traverser.PluggableTraverser"
      permission="zope.Public"
      />
  <adapterTraverserPlugin
      for="schooltool.intervention.interfaces.IInterventionMarker"
      layer="zope.publisher.interfaces.http.IHTTPRequest"
      name="intervention"
      adapter="schooltool.intervention.interfaces.IInterventionStudent"
      permission="schooltool.edit"
      />

  <!-- Traversal to a student's intervention -->
  <adapter
      name="intervention"
      for="schooltool.basicperson.interfaces.IBasicPerson
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="schooltool.traverser.interfaces.ITraverserPlugin"
      factory=".traversal.InterventionStudentTraverserPlugin" />

  <!-- Traversal proxies -->
  <class class=".traversal.InterventionTabProxy">
    <require permission="schooltool.view"
             attributes="user" />
  </class>
  <class class=".traversal.SectionMessagesProxy">
    <require permission="schooltool.view"
             attributes="section" />
  </class>
  <class class=".traversal.StudentSchoolYearsProxy">
    <require permission="schooltool.view"
             attributes="student" />
  </class>
  <class class=".traversal.StudentSchoolYearProxy">
    <require permission="schooltool.view"
             attributes="year" />
  </class>
  <class class=".traversal.StudentMessagesGoalsProxy">
    <require permission="schooltool.view"
             attributes="type" />
  </class>

  <!-- Traversal adapters -->
  <adapter
      name="intervention_tab"
      for="schooltool.basicperson.interfaces.IBasicPerson
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="schooltool.traverser.interfaces.ITraverserPlugin"
      factory=".traversal.InterventionTabTraverserPlugin" />
  <adapter
      name="messages"
      for="schooltool.course.interfaces.ISection
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="schooltool.traverser.interfaces.ITraverserPlugin"
      factory=".traversal.SectionMessagesTraverserPlugin" />
  <adapter
      for=".traversal.SectionMessagesProxy
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="zope.publisher.interfaces.IPublishTraverse"
      factory=".traversal.SectionMessagesTraverser" />
  <adapter
      name="schoolyears"
      for="schooltool.basicperson.interfaces.IBasicPerson
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="schooltool.traverser.interfaces.ITraverserPlugin"
      factory=".traversal.StudentSchoolYearsTraverserPlugin" />
  <adapter
      for=".traversal.StudentSchoolYearsProxy
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="zope.publisher.interfaces.IPublishTraverse"
      factory=".traversal.StudentSchoolYearTraverser" />
  <adapter
      for=".traversal.StudentSchoolYearProxy
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="zope.publisher.interfaces.IPublishTraverse"
      factory=".traversal.StudentMessagesGoalsTraverser" />
  <adapter
      for=".traversal.StudentMessagesGoalsProxy
           zope.publisher.interfaces.http.IHTTPRequest"
      provides="zope.publisher.interfaces.IPublishTraverse"
      factory=".traversal.StudentMessageGoalTraverser" />

</configure>
