<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    i18n_domain="plone">

    <include file="profiles.zcml" />

    <!-- Allow upgrades from alpha releases with an old version scheme -->
    <genericsetup:upgradeStep
        source="4.0a1"
        destination="4001"
        title="Empty upgrade step"
        profile="Products.CMFPlone:plone"
        handler="plone.app.upgrade.utils.null_upgrade_step"
        />

    <genericsetup:upgradeStep
        source="4.0a2"
        destination="4002"
        title="Empty upgrade step"
        profile="Products.CMFPlone:plone"
        handler="plone.app.upgrade.utils.null_upgrade_step"
        />

    <genericsetup:upgradeSteps
        source="*"
        destination="4001"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="Uninstall a broken CacheFu"
            handler=".alphas.removeBrokenCacheFu"
            />

        <genericsetup:upgradeStep
            title="Unregister old export and import steps."
            handler=".alphas.unregisterOldSteps"
            />

        <genericsetup:upgradeStep
            title="Cleanup the persistent tool registry."
            handler=".alphas.cleanUpToolRegistry"
            />

        <genericsetup:upgradeStep
            title="Update the toolset registry."
            handler=".alphas.updateToolset"
            />

        <genericsetup:upgradeStep
            title="Cleanup the skins tool."
            handler=".alphas.cleanUpSkinsTool"
            />

        <genericsetup:upgradeStep
            title="Cleanup Zope's products registry."
            handler=".alphas.cleanUpProductRegistry"
            />

    </genericsetup:upgradeSteps>

    <!-- the source here needs to be kept in sync with the latest 3.x profile
         version.  see also migrations/__init__.py in CMFPlone 3.x and
         p.a.upgrade.v33's configure.zcml -->
    <genericsetup:upgradeSteps
        source="3.3.6"
        destination="4001"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="Remember active theme."
            handler=".alphas.rememberTheme"
            />

        <genericsetup:upgradeStep
            title="General upgrade steps."
            handler=".alphas.threeX_alpha1"
            />

        <genericsetup:upgradeStep
            title="Restore theme after Sunburst has been installed."
            handler=".alphas.restoreTheme"
            />

        <genericsetup:upgradeStep
            title="Upgrade action icons away from the action icons tool."
            handler=".alphas.migrateActionIcons"
            />

        <genericsetup:upgradeStep
            title="Migrate type icons from content_icon to icon_expr"
            handler=".alphas.migrateTypeIcons"
            />

        <genericsetup:upgradeStep
            title="Update the local RAMCache utility import location."
            handler=".alphas.addOrReplaceRamCache"
            />

        <genericsetup:upgradeStep
            title="Update the actor variable expression in several workflows."
            handler=".alphas.changeWorkflowActorVariableExpression"
            />

        <genericsetup:upgradeStep
            title="Update expression for authenticated-only resources."
            handler=".alphas.changeAuthenticatedResourcesCondition"
            />

        <genericsetup:upgradeStep
            title="Configure new reference browser."
            handler=".alphas.setupReferencebrowser"
            />

        <genericsetup:upgradeStep
            title="Remove outdated actions and properties from the Portal FTI."
            handler=".alphas.cleanPloneSiteFTI"
            />

        <genericsetup:upgradeStep
            title="Add new CMFEditions default modifiers."
            handler="plone.app.upgrade.v30.final_three0x.installNewModifiers"
            />

        <genericsetup:upgradeStep
            title="Upgrade MailHost."
            handler=".alphas.migrateMailHost"
            />

        <genericsetup:upgradeStep
            title="Upgrade standard folders to new unified folder type."
            handler=".alphas.migrateFolders"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4001"
        destination="4002"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="Rename join_form_fields."
            handler=".alphas.renameJoinFormFields"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4002"
        destination="4003"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="Update Join action URL"
            handler="plone.app.upgrade.v40.alphas.alpha2_alpha3"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4003"
        destination="4004"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="Upgrade DCMI metadata storage in portal_metadata"
            handler="Products.CMFDefault.upgrade.to22.upgrade_dcmi_metadata"
            />

        <genericsetup:upgradeStep
            title="Add the recursive groups PAS plugin."
            handler=".alphas.addRecursiveGroupsPlugin"
            />

        <genericsetup:upgradeStep
            title="Update portal type of former 'Large Folder' content"
            handler="plone.app.upgrade.v40.alphas.updateLargeFolderType"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4004"
        destination="4005"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="Cleanup Zope's products registry."
            handler=".alphas.cleanUpProductRegistry"
            />

        <genericsetup:upgradeStep
            title="Cleanup Classic Theme CSS registry metadata."
            handler=".alphas.cleanUpClassicThemeResources"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4005"
        destination="4006"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps."
            handler="plone.app.upgrade.v40.alphas.alpha4_alpha5"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4006"
        destination="4007"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.alpha5_beta1"
            />

        <genericsetup:upgradeStep
            title="Ensure recursive groups plugin is properly placed."
            handler=".betas.repositionRecursiveGroupsPlugin"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4007"
        destination="4008"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.beta1_beta2"
            />

        <genericsetup:upgradeStep
            title="Update the safe_html transform with the new config params, migrating existing config from Kupu."
            handler=".betas.updateSafeHTMLConfig"
            />

        <genericsetup:upgradeStep
            title="Update the getIcon metadata column for all core content types."
            handler=".betas.updateIconMetadata"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4008"
        destination="4009"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.beta2_beta3"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4009"
        destination="4010"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.beta3_beta4"
            />

        <genericsetup:upgradeStep
            title="Complete removal of Large Plone Folder content type"
            handler="plone.app.upgrade.v40.betas.removeLargePloneFolder"
            />

        <genericsetup:upgradeStep
            title="Convert standard file and image types to blobs."
            handler="plone.app.upgrade.v40.betas.convertToBlobs"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4010"
        destination="4011"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.beta4_beta5"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4011"
        destination="4012"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.beta5_rc1"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4012"
        destination="4013"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.rc1_final"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4013"
        destination="4014"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.four01"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4014"
        destination="4015"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.four02"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4015"
        destination="4016"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.four03"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4016"
        destination="4017"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.four04"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeSteps
        source="4017"
        destination="4018"
        profile="Products.CMFPlone:plone">

        <genericsetup:upgradeStep
            title="General upgrade steps"
            handler="plone.app.upgrade.v40.betas.four05"
            />

    </genericsetup:upgradeSteps>

    <genericsetup:upgradeStep
        source="4018"
        destination="4019"
        profile="Products.CMFPlone:plone"
        title="No upgrade steps"
        handler="plone.app.upgrade.utils.null_upgrade_step" />

    <genericsetup:upgradeStep
        source="4019"
        destination="4020"
        profile="Products.CMFPlone:plone"
        title="No upgrade steps"
        handler="plone.app.upgrade.utils.null_upgrade_step" />

    <genericsetup:upgradeStep
        source="4020"
        destination="4022"
        profile="Products.CMFPlone:plone"
        title="No upgrade steps"
        handler="plone.app.upgrade.utils.null_upgrade_step" />


</configure>
