<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    xmlns:browser="http://namespaces.zope.org/browser"
    >
    <!-- load permissions.zcml -->
    <include package="Products.CMFCore" />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="view"
        class=".connector.Connector"
        template="connector_view.pt"
        permission="zope2.View"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="connector-dispatch"
        class=".connector.Dispatcher"
        permission="zope2.View"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="create-collection"
        attribute="create_collection"
        class=".connector.Connector"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="remove-collection"
        attribute="remove_collection"
        class=".connector.Connector"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="rename-collection"
        attribute="rename_collection"
        class=".connector.Connector"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="view-editor-readonly"
        class=".connector.AceEditorReadonly"
        permission="zope2.View"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="view-editor"
        class=".connector.AceEditor"
        permission="zope2.View"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="connector-clear-contents"
        class=".connector.Connector"
        attribute="clear_contents"
        permission="cmf.ModifyPortalContent"
    />
    
    <browser:page
        for="*"
        name="connector-log"
        class=".connector.Logging"
        template="connector_log.pt"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="*"
        name="connector-log-clear"
        class=".connector.Logging"
        attribute="log_clear"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="connector-zip-import"
        template="connector_zip_import.pt"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="connector-zip-export"
        class=".connector.Connector"
        attribute="zip_export"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="connector-zip-upload"
        class=".connector.Connector"
        attribute="zip_import"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="xmldirector.plonecore.connector.IConnector"
        name="connector-reindex"
        class=".connector.Connector"
        attribute="reindex"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
        name="xmldirector-core-settings"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.DBSettingsControlPanel"
        permission="cmf.ManagePortal"
    />

    <browser:page
        name="xmldirector-connection-test"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.DBSettingsControlPanel"
        template="connection_test.pt"
        permission="cmf.ManagePortal"
    />

    <browser:page
        name="error"
        for="xmldirector.plonecore.connector.IConnector"
        template="error.pt"
        permission="zope2.View"
    />

    <!-- Validator registry -->
    <browser:page
        name="validator-registry"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.ValidatorRegistry"
        template="validator_registry.pt"
        permission="cmf.ManagePortal"
    />

    <browser:page
        name="validator-registry-view"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.ValidatorRegistry"
        template="validator_registry_view.pt"
        permission="cmf.ManagePortal"
    />

    <!-- Validator registry -->
    <browser:page
        name="transformer-registry"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.TransformerRegistry"
        template="transformer_registry.pt"
        permission="cmf.ManagePortal"
    />

    <browser:page
        name="transformer-registry-view"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.TransformerRegistry"
        template="transformer_registry_view.pt"
        permission="cmf.ManagePortal"
    />

    <!-- viewlet -->

	<browser:viewlet
	    name="xmldirector.plonecore.xml_debug"
	    manager="plone.app.layout.viewlets.interfaces.IBelowContentBody"
	    template="viewlet.pt"
	    class=".viewlet.Debug"
	    permission="zope2.View"
	    />

    <!-- Public XML-DB API --> 

    <browser:page 
        name="api-query"
        for="xmldirector.plonecore.connector.IConnector"
        permission="zope2.View"
        class=".api.API"
        attribute="generic_query"
    />

    <browser:page
        name="api-validate-xml"
        for="*"
        permission="zope2.View"
        class=".api.Validation"
        attribute="validate"
    />

    <browser:resourceDirectory
        name="xmldirector.plonecore"
        directory="resources"
    />

</configure>
