Author: jmorliaguet
Date: Sat Dec 10 16:05:08 2005
New Revision: 2006

Modified:
   cpsskins/branches/jmo-perspectives/engines/default/formats/style.py
   cpsskins/branches/jmo-perspectives/perspectives/configure.zcml
   cpsskins/branches/jmo-perspectives/perspectives/perspective.py
   cpsskins/branches/jmo-perspectives/setup/interfaces.py
   cpsskins/branches/jmo-perspectives/setup/registration.py
Log:

- renamed IResourceImporter to IDataImporter and IResourceExporter
  to IDataExporter to be more generic



Modified: cpsskins/branches/jmo-perspectives/engines/default/formats/style.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/engines/default/formats/style.py 
(original)
+++ cpsskins/branches/jmo-perspectives/engines/default/formats/style.py Sat Dec 
10 16:05:08 2005
@@ -32,7 +32,7 @@
 from cpsskins.elements.interfaces import IFormat
 from cpsskins.elements.format import Format
 from cpsskins.relations import Predicate
-from cpsskins.setup.interfaces import IResourceExporter, IResourceImporter
+from cpsskins.setup.interfaces import IDataExporter, IDataImporter
 
 _ = MessageFactory("cpsskins")
 
@@ -178,7 +178,7 @@
 class Exporter(BrowserView):
     """This adapter makes it possible to export style resources
     """
-    implements(IResourceExporter)
+    implements(IDataExporter)
 
     def export(self):
         return self.template()
@@ -195,7 +195,7 @@
     """This adapter makes it possible to import style resources.
     """
     adapts(IStyle)
-    implements(IResourceImporter)
+    implements(IDataImporter)
 
     def __init__(self, context):
         self.context = context

Modified: cpsskins/branches/jmo-perspectives/perspectives/configure.zcml
==============================================================================
--- cpsskins/branches/jmo-perspectives/perspectives/configure.zcml      
(original)
+++ cpsskins/branches/jmo-perspectives/perspectives/configure.zcml      Sat Dec 
10 16:05:08 2005
@@ -47,7 +47,7 @@
   <adapter
       for=".interfaces.IPerspective"
       factory=".perspective.Importer"
-      provides="cpsskins.setup.interfaces.IResourceImporter"
+      provides="cpsskins.setup.interfaces.IDataImporter"
   />
 
 </configure>

Modified: cpsskins/branches/jmo-perspectives/perspectives/perspective.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/perspectives/perspective.py      
(original)
+++ cpsskins/branches/jmo-perspectives/perspectives/perspective.py      Sat Dec 
10 16:05:08 2005
@@ -1,4 +1,4 @@
-##############################################################################
+############################################################################
 #
 # Copyright (c) 2005 Nuxeo and Contributors.
 # All Rights Reserved.
@@ -26,7 +26,7 @@
 
 from cpsskins.perspectives.interfaces import IPerspective
 from cpsskins.relations.interfaces import IRelatable
-from cpsskins.setup.interfaces import IResourceExporter, IResourceImporter
+from cpsskins.setup.interfaces import IDataExporter, IDataImporter
 
 class Perspective(object):
     """A perspective
@@ -81,7 +81,7 @@
 class Exporter(BrowserView):
     """This view makes it possible to export style resource data
     """
-    implements(IResourceExporter)
+    implements(IDataExporter)
 
     def export(self):
         return self.template()
@@ -90,7 +90,7 @@
     """This adapter makes it possible to import style resource data
     """
     adapts(IPerspective)
-    implements(IResourceImporter)
+    implements(IDataImporter)
 
     def __init__(self, context):
         self.context = context

Modified: cpsskins/branches/jmo-perspectives/setup/interfaces.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/setup/interfaces.py      (original)
+++ cpsskins/branches/jmo-perspectives/setup/interfaces.py      Sat Dec 10 
16:05:08 2005
@@ -78,14 +78,14 @@
     def customize(name, context):
         """Customize a resource."""
 
-class IResourceExporter(Interface):
-    """A resource exporter is used to export resource data.
+class IDataExporter(Interface):
+    """A data exporter is used to export data to XML
     """
     def export():
         """Export to XML."""
 
-class IResourceImporter(Interface):
-    """A resource exporter is used to import resource data.
+class IDataImporter(Interface):
+    """A data import is used to import data from XML
     """
     def load(xml):
         """Load data from XML."""

Modified: cpsskins/branches/jmo-perspectives/setup/registration.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/setup/registration.py    (original)
+++ cpsskins/branches/jmo-perspectives/setup/registration.py    Sat Dec 10 
16:05:08 2005
@@ -28,7 +28,7 @@
 from zope.component import queryUtility, getUtility
 from zope.component.interfaces import IFactory
 
-from cpsskins.setup.interfaces import IResourceImporter, IResourceManager
+from cpsskins.setup.interfaces import IDataImporter, IResourceManager
 from cpsskins.setup.interfaces import ISetting, IResource
 
 DEBUG = logging.DEBUG
@@ -75,7 +75,7 @@
             resource_object = factory()
 
             # load the data
-            IResourceImporter(resource_object).load(resource.toxml())
+            IDataImporter(resource_object).load(resource.toxml())
 
             # register the resource
             resources.register(name=name, title=title, 
resource=resource_object,
@@ -131,7 +131,7 @@
 
         setting = getUtility(ISetting, setting_name)
         resource_object = IResource(setting).getResource()
-        IResourceImporter(resource_object).load(resource.toxml())
+        IDataImporter(resource_object).load(resource.toxml())
 
         if name:
             logger.log(DEBUG, "reloaded setting %s in %s" % (name, filename))
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to