<configure xmlns='http://namespaces.zope.org/zope'
    xmlns:naaya="http://namespaces.zope.org/naaya"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    xmlns:browser="http://namespaces.zope.org/browser">
    <include package=".adapter" />

    <include file="permissions.zcml"
        package="Products.NaayaBase"/>

  <browser:page
    name="manage_bundle"
    for="Products.Naaya.interfaces.INySite"
    class=".views.SetBundleView"
    template="./zpt/site_manage_bundle.pt"
    permission="zope2.ViewManagementScreens"
    />

  <browser:page
    name="go_pdb"
    for="*"
    class=".views.PDBView"
    permission="zope2.ViewManagementScreens"
    />

  <naaya:simpleView
        for="Products.Naaya.interfaces.INySite"
        name="admin_api_keys_status_html"
        handler=".views.AdminAPIKeysStatus"
        permission="zope2.NaayaPublishContent" />

  <browser:resourceDirectory
      name="Products.Naaya"
      directory="www"
      />

  <adapter
    factory=".NyFolderBase.ObjectListingPortlet"
    name="portlet_objects_listing"
    provides="Products.NaayaCore.PortletsTool.interfaces.INyPortlet"
    for="Products.Naaya.interfaces.INySite"
    />

  <adapter
    for="OFS.interfaces.IItem"
    provides=".interfaces.IObjectView"
    factory=".adapters.GenericViewAdapter"
    />

  <adapter
    for="naaya.content.base.interfaces.INyContentObject"
    provides=".interfaces.IObjectView"
    factory=".adapters.NyContentTypeViewAdapter"
    />

  <adapter
    for="naaya.content.file.interfaces.INyFile"
    provides=".interfaces.IObjectView"
    factory=".adapters.NyFileViewAdapter"
    />

  <adapter
    for="naaya.content.exfile.interfaces.INyExFile"
    provides=".interfaces.IObjectView"
    factory=".adapters.NyExFileViewAdapter"
    />

  <adapter
    for=".interfaces.INyFolder"
    provides=".interfaces.IObjectView"
    factory=".adapters.NyFolderViewAdapter"
    />

  <adapter factory="Products.Naaya.portlets.AdministrationPortlet"
           name="portlet_administration" />

  <class class=".NyFolder.NyFolder">
    <implements interface="naaya.core.interfaces.INyObjectContainer" />
  </class>

  <subscriber
    handler=".subscribers.update_maintopics_after_move"
    for="naaya.content.base.interfaces.INyContentObjectMovedEvent"
    />
  <subscriber
    handler=".subscribers.site_cloned"
    for="Products.Naaya.interfaces.INySite OFS.event.ObjectClonedEvent"
    />
   <subscriber
    handler=".subscribers.site_moved_or_added"
    for="Products.Naaya.interfaces.INySite zope.app.container.interfaces.IObjectMovedEvent"
    />

    <subscriber
    handler=".subscribers.zope_started"
    for="zope.processlifetime.IProcessStarting"
    />

  <include package="naaya.core" />
  <include package="naaya.component" />
  <include package="naaya.content.base" />
  <include package="naaya.content.bfile" />
  <include package="naaya.content.contact" />
  <include package="naaya.content.document" />
  <include package="naaya.content.event" />
  <include package="naaya.content.exfile" />
  <include package="naaya.content.file" />
  <include package="naaya.content.geopoint" />
  <include package="naaya.content.mediafile" />
  <include package="naaya.content.news" />
  <include package="naaya.content.pointer" />
  <include package="naaya.content.story" />
  <include package="naaya.content.url" />
  <include package="naaya.i18n" />
  <!-- optional packages -->
  <configure zcml:condition="installed naaya.monitor">
    <include package="naaya.monitor" />
  </configure>

  <naaya:call factory=".naaya_bundle_registration" />
  <naaya:call factory=".permissions.register_permissions" />
</configure>
