Is there a good reference list for the names of the genericsetup import steps

安稳与你 提交于 2019-12-05 10:02:12

You should try this:

stepregistry = portal.portal_setup.getImportStepRegistry()
stepregistry.listSteps()

edit:

actually this will give you the complete list (I've tested it this time):

>>> portal.portal_setup.getSortedImportSteps()
(u'PloneSurvey_various', u'rolemap', u'sharing', u'plone-difftool',...

...and if you want more metadata use this:

>>> portal.portal_setup.getImportStepMetadata('jsregistry')
{'handler': 'Products.ResourceRegistries.exportimport.jsregistry.importJSRegistry', 'description': u'Import javascript registry', 'version': None, 'title': u'Javascript registry', 'dependencies': (u'toolset', u'componentregistry'), 'id': u'jsregistry', 'invalid': False}
David Bain

What I ended up doing was as follows: go into the plone/app/registry/exportimport/configure.zcml file where the name was registered as:

<gs:importStep

    name="plone.app.registry"

    title="Manage the configuration registry"

    description="Add or remove records, or change values"

    handler=".handler.importRegistry">
    <depends name="componentregistry"/>

    <depends name="toolset"/>`

</gs:importStep>`

Turns out the name of the import step was registered as 'plone.app.registry'

So basically I had to dig into the code to find out where the importStep was registered.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!