<?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"
      name="intervention"
      adapter="schooltool.intervention.interfaces.IInterventionSchoolYear"
      />

  <pluggableTraverser
      for="schooltool.intervention.interfaces.IInterventionMarker"
      type="zope.publisher.interfaces.http.IHTTPRequest"
      permission="zope.Public"
      />

  <adapterTraverserPlugin
      for="schooltool.intervention.interfaces.IInterventionMarker"
      name="intervention"
      adapter="schooltool.intervention.interfaces.IInterventionStudent"
      permission="schooltool.edit"
      />

  <!-- Traversal to a student's intervention -->
  <traverserPlugin
      name="intervention"
      for="schooltool.basicperson.interfaces.IBasicPerson"
      plugin=".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 -->
  <traverserPlugin
      name="intervention_tab"
      for="schooltool.basicperson.interfaces.IBasicPerson"
      plugin=".traversal.InterventionTabTraverserPlugin"
      />

  <traverserPlugin
      name="messages"
      for="schooltool.course.interfaces.ISection"
      plugin=".traversal.SectionMessagesTraverserPlugin"
      />

  <traverser
      for=".interfaces.ISectionMessagesProxy"
      type="zope.publisher.interfaces.http.IHTTPRequest"
      factory=".traversal.SectionMessagesTraverser"
      />

  <traverserPlugin
      name="schoolyears"
      for="schooltool.basicperson.interfaces.IBasicPerson"
      plugin=".traversal.StudentSchoolYearsTraverserPlugin"
      />

  <traverser
      for=".interfaces.IStudentSchoolYearsProxy"
      type="zope.publisher.interfaces.http.IHTTPRequest"
      factory=".traversal.StudentSchoolYearTraverser"
      />

  <traverser
      for=".interfaces.IStudentSchoolYearProxy"
      type="zope.publisher.interfaces.http.IHTTPRequest"
      factory=".traversal.StudentMessagesGoalsTraverser"
      />

  <traverser
      for=".interfaces.IStudentMessagesGoalsProxy"
      type="zope.publisher.interfaces.http.IHTTPRequest"
      factory=".traversal.StudentMessageGoalTraverser"
      />

</configure>
