<!-- $Id$ -->

<configure
   xmlns:zope="http://namespaces.zope.org/zope"
   xmlns:browser="http://namespaces.zope.org/browser"
   i18n_domain="loops">

  <!-- party: person, address, task, ... -->

  <zope:adapter factory="loops.organize.party.Person"
                provides="loops.organize.interfaces.IPerson"
                trusted="True" />
  <zope:class class="loops.organize.party.Person">
    <require permission="zope.View"
             interface="loops.organize.interfaces.IPerson" />
    <require permission="zope.ManageContent"
             set_schema="loops.organize.interfaces.IPerson" />
  </zope:class>

  <zope:subscriber
        for="loops.interfaces.IConcept
             zope.app.container.interfaces.IObjectRemovedEvent"
        handler="loops.organize.party.removePersonReferenceFromPrincipal"
        />

  <zope:adapter factory="loops.organize.party.Address" trusted="True" />
  <zope:class class="loops.organize.party.Address">
    <require permission="zope.View"
             interface="loops.organize.interfaces.IAddress" />
    <require permission="zope.ManageContent"
             set_schema="loops.organize.interfaces.IAddress" />
  </zope:class>

  <zope:adapter factory="loops.organize.task.Task" trusted="True" />
  <zope:class class="loops.organize.task.Task">
    <require permission="zope.View"
             interface="loops.organize.interfaces.ITask" />
    <require permission="zope.ManageContent"
             set_schema="loops.organize.interfaces.ITask" />
  </zope:class>

  <zope:adapter factory="loops.organize.task.Event" 
                provides="loops.organize.interfaces.IEvent"
                trusted="True" />
  <zope:class class="loops.organize.task.Event">
    <require permission="zope.View"
             interface="loops.organize.interfaces.IEvent" />
    <require permission="zope.ManageContent"
             set_schema="loops.organize.interfaces.IEvent" />
  </zope:class>

  <zope:adapter factory="loops.organize.task.AgendaItem" 
                provides="loops.organize.interfaces.IAgendaItem"
                trusted="True" />
  <zope:class class="loops.organize.task.AgendaItem">
    <require permission="zope.View"
             interface="loops.organize.interfaces.IAgendaItem" />
    <require permission="zope.ManageContent"
             set_schema="loops.organize.interfaces.IAgendaItem" />
  </zope:class>

  <zope:adapter factory="loops.organize.party.HasRole"
                provides="loops.organize.interfaces.IHasRole"
                trusted="True" />
  <zope:class class="loops.organize.party.HasRole">
    <require permission="zope.View"
             interface="loops.organize.interfaces.IHasRole" />
    <require permission="zope.ManageContent"
             set_schema="loops.organize.interfaces.IHasRole" />
  </zope:class>

  <!-- member registration -->

  <zope:adapter factory="loops.organize.member.MemberRegistrationManager"
                trusted="True" />
  <zope:class class="loops.organize.member.MemberRegistrationManager">
    <require permission ="zope.Public"
             interface="loops.organize.interfaces.IMemberRegistrationManager" />
  </zope:class>

  <!-- authentication -->

  <zope:utility
      name="loops Session Credentials"
      provides="zope.app.authentication.interfaces.ICredentialsPlugin"
      factory="loops.organize.auth.LoopsSessionCredentialsPlugin" />

  <zope:class class="loops.organize.auth.PersonBasedAuthenticator">
    <require
        permission="zope.ManageServices"
        attributes="prefix" />
  </zope:class>

  <!-- other adapters -->

  <zope:adapter factory="loops.organize.schema.PersonSchemaFactory" />

  <zope:adapter factory="loops.organize.schema.SimpleListFieldInstance"
                name="simplelist" />

  <zope:adapter
        for="loops.interfaces.ILoopsObject
             zope.publisher.interfaces.browser.IBrowserRequest"
        factory="loops.organize.memberinfo.MemberInfoProvider"
        permission="zope.Public" />

  <zope:adapter factory="loops.organize.setup.SetupManager"
                name="organize" />

  <zope:utility factory="loops.organize.presence.Presence" />

  <!-- include -->

  <include package=".browser" />
  <include package=".comment" />
  <include package=".job" />
  <include package=".personal" />
  <include package=".process" />
  <include package=".stateful" />
  <include package=".tracking" />
  <include package=".work" />

</configure>
