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

  <subscriber
    handler="Products.NaayaCore.NotificationTool.subscribers.handle_object_add"
    for="naaya.content.base.interfaces.INyContentObjectAddEvent"
    />

  <subscriber
    handler="Products.NaayaCore.NotificationTool.subscribers.handle_object_edit"
    for="naaya.content.base.interfaces.INyContentObjectEditEvent"
    />

  <subscriber
    handler="Products.NaayaCore.NotificationTool.subscribers.handle_object_approved"
    for="naaya.content.base.interfaces.INyContentObjectApproveEvent"
    />

  <subscriber
    handler="Products.NaayaCore.NotificationTool.subscribers.handle_csv_import"
    for="Products.NaayaCore.interfaces.ICSVImportEvent"
    />

  <subscriber
    handler="Products.NaayaCore.NotificationTool.subscribers.handle_zip_import"
    for="Products.NaayaCore.interfaces.IZipImportEvent"
    />

  <subscriber for="Products.Naaya.interfaces.INySite
                   Products.Naaya.interfaces.IHeartbeat"
              handler=".subscribers.heartbeat_notification" />

  <subscriber
    for="Products.NaayaCore.AuthenticationTool.interfaces.IRoleAssignmentEvent"
    handler=".subscribers.change_user_roles" />

  <subscriber
    handler="Products.NaayaCore.NotificationTool.subscribers.handle_comment_added"
    for="Products.NaayaBase.interfaces.INyCommentAddEvent"
    />

  <adapter
    factory=".portlets.NotificationsPortlet"
    for="Products.Naaya.interfaces.INySite"
    provides="Products.NaayaCore.PortletsTool.interfaces.INyPortlet"
    name="portlet_notifications"
    />

  <adapter
    factory=".containers.subscription_container_factory" />

  <class class="Products.Naaya.NySite.NySite">
    <implements interface=".interfaces.ISubscriptionTarget" />
  </class>

  <class class="Products.Naaya.NyFolder.NyFolder">
    <implements interface=".interfaces.ISubscriptionTarget" />
  </class>

  <configure zcml:condition="installed Products.naayaUpdater">
    <utility name="remove_notification_userid_spaces.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.RemoveNotifUseridSpaces"
             permission="zope2.ViewManagementScreens" />
    <utility name="add_pending_subscriptions_container.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.AddPendingSubscriptionsContainer"
             permission="zope2.ViewManagementScreens" />
    <utility name="subscribe_administrative_notifications.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.SubscribeAdministrativeNotifications"
             permission="zope2.ViewManagementScreens" />
</configure>

  <browser:resourceDirectory
    name="NaayaCore.NotificationTool"
    directory="./www"
    permission="zope.Public"
  />

</configure>
