<configure
    xmlns="http://namespaces.zope.org/zope" 
    xmlns:five="http://namespaces.zope.org/five"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    i18n_domain="plone">
    
    <include package="zope.annotation" />
    
    <include package=".subscribers"/>
    <include package=".browser"/>

    <!-- Set up as a Zope product and register an extension profile -->
    <five:registerPackage package="." initialize=".initialize" />
    
    <genericsetup:registerProfile
      name="plone.app.iterate"
      title="Working Copy Support (Iterate)"
      directory="profiles/default"
      description="Adds working copy support (aka. in-place staging) to Plone."
      provides="Products.GenericSetup.interfaces.EXTENSION"
      />

    <!-- Policy and behaviour for basic objects -->
    <class class="Products.Archetypes.BaseObject.BaseObject">
        <implements interface=".interfaces.IIterateAware" />
    </class>
    
    <adapter factory=".policy.CheckinCheckoutPolicyAdapter" />
    <adapter factory=".relation.CheckinCheckoutReferenceAdapter"/>
    <adapter factory=".archiver.ContentArchiver" />
    <adapter factory=".copier.ContentCopier" />
    
    <!-- Checkout folder locators -->
    <adapter
        factory=".containers.HomeFolderLocator"
        name="plone.app.iterate.home"
        />
        
    <adapter
        factory=".containers.ParentFolderLocator"
        name="plone.app.iterate.parent"
        />

    <!-- Handle deletions of working copies -->    
    <subscriber
       for=".interfaces.IWorkingCopyRelation
            zope.app.container.interfaces.IObjectRemovedEvent"
       handler=".event.handleDeletion"
       />

</configure>
