Mailing List Archive

SVN: PluggableAuthService/trunk/ Configure importers (scriptable plugin is still problematic)x
Log message for revision 41653:
Configure importers (scriptable plugin is still problematic)x

Changed:
U PluggableAuthService/trunk/exportimport.zcml
U PluggableAuthService/trunk/plugins/exportimport.py

-=-
Modified: PluggableAuthService/trunk/exportimport.zcml
===================================================================
--- PluggableAuthService/trunk/exportimport.zcml 2006-02-17 22:12:31 UTC (rev 41652)
+++ PluggableAuthService/trunk/exportimport.zcml 2006-02-17 22:16:49 UTC (rev 41653)
@@ -16,24 +16,48 @@
/>

<adapter
+ factory="Products.GenericSetup.content.FolderishExporterImporter"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".interfaces.authservice.IPluggableAuthService"
+ />
+
+ <adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.ChallengeProtocolChooser.IChallengeProtocolChooserPlugin"
/>

<adapter
+ factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.ChallengeProtocolChooser.IChallengeProtocolChooserPlugin"
+ />
+
+ <adapter
factory=".plugins.exportimport.CookieAuthHelperExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.CookieAuthHelper.ICookieAuthHelper"
/>

<adapter
+ factory=".plugins.exportimport.CookieAuthHelperExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.CookieAuthHelper.ICookieAuthHelper"
+ />
+
+ <adapter
factory=".plugins.exportimport.DelegatePathExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.DelegatingMultiPlugin.IDelegatingMultiPlugin"
/>

<adapter
+ factory=".plugins.exportimport.DelegatePathExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.DelegatingMultiPlugin.IDelegatingMultiPlugin"
+ />
+
+ <adapter
factory=".plugins.exportimport.DomainAuthHelperExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.DomainAuthHelper.IDomainAuthHelper"
@@ -46,6 +70,12 @@
/>

<adapter
+ factory=".plugins.exportimport.DynamicGroupsPluginExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.DynamicGroupsPlugin.IDynamicGroupsPlugin"
+ />
+
+ <adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.HTTPBasicAuthHelper.IHTTPBasicAuthHelper"
@@ -53,32 +83,56 @@

<adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.HTTPBasicAuthHelper.IHTTPBasicAuthHelper"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.InlineAuthHelper.IInlineAuthHelper"
/>

<adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.InlineAuthHelper.IInlineAuthHelper"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.LocalRolePlugin.ILocalRolePlugin"
/>

<adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.LocalRolePlugin.ILocalRolePlugin"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.RecursiveGroupsPlugin.IRecursiveGroupsPlugin"
/>

<adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.RecursiveGroupsPlugin.IRecursiveGroupsPlugin"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.RequestTypeSniffer.IRequestTypeSnifferPlugin"
/>

<adapter
- factory="Products.GenericSetup.content.FolderishExporterImporter"
- provides="Products.GenericSetup.interfaces.IFilesystemExporter"
- for=".plugins.ScriptablePlugin.IScriptablePlugin"
+ factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.RequestTypeSniffer.IRequestTypeSnifferPlugin"
/>

<adapter
@@ -88,27 +142,81 @@
/>

<adapter
+ factory=".plugins.exportimport.DelegatePathExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.SearchPrincipalsPlugin.ISearchPrincipalsPlugin"
+ />
+
+ <adapter
factory=".plugins.exportimport.TitleOnlyExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.SessionAuthHelper.ISessionAuthHelper"
/>

<adapter
+ factory=".plugins.exportimport.TitleOnlyExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.SessionAuthHelper.ISessionAuthHelper"
+ />
+
+ <adapter
factory=".plugins.exportimport.ZODBUserManagerExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.ZODBUserManager.IZODBUserManager"
/>

<adapter
+ factory=".plugins.exportimport.ZODBUserManagerExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.ZODBUserManager.IZODBUserManager"
+ />
+
+ <adapter
factory=".plugins.exportimport.ZODBGroupManagerExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.ZODBGroupManager.IZODBGroupManager"
/>

<adapter
+ factory=".plugins.exportimport.ZODBGroupManagerExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.ZODBGroupManager.IZODBGroupManager"
+ />
+
+ <adapter
factory=".plugins.exportimport.ZODBRoleManagerExportImport"
provides="Products.GenericSetup.interfaces.IFilesystemExporter"
for=".plugins.ZODBRoleManager.IZODBRoleManager"
/>

+ <adapter
+ factory=".plugins.exportimport.ZODBRoleManagerExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.ZODBRoleManager.IZODBRoleManager"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.ScriptablePluginExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemExporter"
+ for=".plugins.ScriptablePlugin.IScriptablePlugin"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.ScriptablePluginExportImport"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for=".plugins.ScriptablePlugin.IScriptablePlugin"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.PythonScriptFileAdapter"
+ provides="Products.GenericSetup.interfaces.IFilesystemExporter"
+ for="Products.GenericSetup.PythonScripts.interfaces.IPythonScript"
+ />
+
+ <adapter
+ factory=".plugins.exportimport.PythonScriptFileAdapter"
+ provides="Products.GenericSetup.interfaces.IFilesystemImporter"
+ for="Products.GenericSetup.PythonScripts.interfaces.IPythonScript"
+ />
+
</configure>

Modified: PluggableAuthService/trunk/plugins/exportimport.py
===================================================================
--- PluggableAuthService/trunk/plugins/exportimport.py 2006-02-17 22:12:31 UTC (rev 41652)
+++ PluggableAuthService/trunk/plugins/exportimport.py 2006-02-17 22:16:49 UTC (rev 41653)
@@ -61,6 +61,8 @@

from Products.GenericSetup.interfaces import IFilesystemExporter
from Products.GenericSetup.interfaces import IFilesystemImporter
+from Products.GenericSetup.content import DAVAwareFileAdapter
+from Products.GenericSetup.content import FolderishExporterImporter

try:
from Products.GenericSetup.utils import PageTemplateResource
@@ -424,3 +426,24 @@
return {'title': self.context.title,
'groups': group_info,
}
+
+class ScriptablePluginExportImport(FolderishExporterImporter):
+ """ Export / import the Scriptable type plugin.
+ """
+ def export(self, export_context, subdir, root=False):
+ """ See IFilesystemExporter.
+ """
+ FolderishExporterImporter.export(self, export_context, subdir, root)
+
+ def import_(self, import_context, subdir, root=False):
+ """ See IFilesystemImporter.
+ """
+ FolderishExporterImporter.import_(self, import_context, subdir, root)
+
+class PythonScriptFileAdapter(DAVAwareFileAdapter):
+ """File-ish for PythonScript.
+ """
+ def _getFileName(self):
+ """ Return the name under which our file data is stored.
+ """
+ return '%s.py' % self.context.getId()

_______________________________________________
Zope-CVS maillist - Zope-CVS@zope.org
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS