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

  <include file="permissions.zcml" />

  <class class=".NyContentType.NyContentType">
    <implements interface="Products.NaayaCore.CatalogTool.interfaces.INyCatalogAware" />
  </class>

  <include package="contentratings" />
  <five:implements class=".NyContentType.NyContentType"
    interface="contentratings.interfaces.IUserRatable" />

  <adapter
    for=".NyRoleManager.NyRoleManager"
    provides="zope.annotation.interfaces.IAnnotations"
    factory="zope.annotation.attribute.AttributeAnnotations"
    />

  <adapter
    for="AccessControl.interfaces.IRoleManager"
    provides=".interfaces.IRoleLogger"
    factory=".NyRoleManager.RoleLogger"
    />

  <subscriber
    handler=".subscribers.handle_add_local_role"
    for=".interfaces.INyAddLocalRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_set_local_role"
    for=".interfaces.INySetLocalRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_del_local_role"
    for=".interfaces.INyDelLocalRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_add_user_role"
    for=".interfaces.INyAddUserRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_set_user_role"
    for=".interfaces.INySetUserRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_del_user_role"
    for=".interfaces.INyDelUserRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_add_group_roles"
    for=".interfaces.INyAddGroupRoleEvent"
    />

  <subscriber
    handler=".subscribers.handle_remove_group_roles"
    for=".interfaces.INyRemoveGroupRoleEvent"
    />

  <class class=".NyComments.NyComment">
    <implements interface="Products.NaayaCore.CatalogTool.interfaces.INyCatalogAware" />
  </class>

  <subscriber handler=".NyComments.handleComentedObject" />

  <configure zcml:condition="installed Products.naayaUpdater">
    <utility name="skip_approval_permission.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.SkipApprovalPermission"
             permission="zope2.ViewManagementScreens" />
    <utility name="hide_sortorder_property_from_schemas"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.HideSortOrderFromSchemas"
             permission="zope2.ViewManagementScreens" />
    <utility name="add_help_text_on_news_description"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.AddHelpTextOnNewsDescription"
             permission="zope2.ViewManagementScreens" />
    <utility name="restrict_unapproved.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.RestrictUnapproved"
             permission="zope2.ViewManagementScreens" />
    <utility name="set_photo_permissions.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.SetPhotoFolderGalleryPermission"
             permission="zope2.ViewManagementScreens" />
    <utility name="delete_old_properties.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.RemoveNyContentProps"
             permission="zope2.ViewManagementScreens" />
    <utility name="add_last_modification.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.AddLastModificationProperty"
             permission="zope2.ViewManagementScreens" />
    <utility name="remove_duplicate_images.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.RemoveDuplicateImages"
             permission="zope2.ViewManagementScreens" />
    <utility name="add_css_to_standard_template.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.AddMissingCSSToStandardTemplate"
             permission="zope2.ViewManagementScreens" />
    <utility name="add_aspect_ratio_to_media_files.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.AddAspectRatioToMediaFiles"
             permission="zope2.ViewManagementScreens" />
    <utility name="remove_invalid_pointers.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.DeleteInvalidPointers"
             permission="zope2.ViewManagementScreens" />
    <utility name="set_permission_create_user.update"
             provides="Products.naayaUpdater.interfaces.IUpdateScript"
             component=".updates.CreateUserPermission"
             permission="zope2.ViewManagementScreens" />
  </configure>

</configure>
