Back to index

plone3  3.1.7
manage.py
Go to the documentation of this file.
00001 from Products.Five import BrowserView
00002 from Products.GenericSetup.registry import _import_step_registry
00003 from Products.GenericSetup.registry import _export_step_registry
00004 
00005 
00006 class ImportStepsView(BrowserView):
00007     def __init__(self, context, request):
00008         BrowserView.__init__(self, context, request)
00009         self.global_registry=_import_step_registry
00010         self.tool_registry=context.getImportStepRegistry()
00011 
00012     def invalidSteps(self):
00013         steps=self.tool_registry.listStepMetadata()
00014         steps=[step for step in steps if step['invalid']]
00015         return steps
00016 
00017 
00018     def doubleSteps(self):
00019         steps=set(self.tool_registry.listSteps())
00020         globals=set(self.global_registry.listSteps())
00021         steps=steps.intersection(globals)
00022         steps=[self.tool_registry.getStepMetadata(step) for step in steps]
00023         steps.sort()
00024         return steps
00025 
00026 
00027 
00028 class ExportStepsView(ImportStepsView):
00029     def __init__(self, context, request):
00030         BrowserView.__init__(self, context, request)
00031         self.global_registry=_export_step_registry
00032         self.tool_registry=context.getExportStepRegistry()
00033