[Zope-CVS] CVS: Products/AdaptableStorage/mapper/interfaces - IAspectSerializer.py:1.1.2.1 IConfigurableObjectMapper.py:1.1.2.1 IMapperEvent.py:1.1.2.1 IObjectSerializer.py:1.1.2.1 public.py:1.1.2.1

Christian Zagrodnick cz@gocept.com
Mon, 13 Jan 2003 14:17:43 -0500


Update of /cvs-repository/Products/AdaptableStorage/mapper/interfaces
In directory cvs.zope.org:/tmp/cvs-serv19385/interfaces

Modified Files:
      Tag: zagy-patches
	IAspectSerializer.py IConfigurableObjectMapper.py 
	IMapperEvent.py IObjectSerializer.py public.py 
Log Message:
merging HEAD into zagy-patches branch

=== Products/AdaptableStorage/mapper/interfaces/IAspectSerializer.py 1.1 => 1.1.2.1 ===
--- Products/AdaptableStorage/mapper/interfaces/IAspectSerializer.py:1.1	Tue Dec 31 16:47:46 2002
+++ Products/AdaptableStorage/mapper/interfaces/IAspectSerializer.py	Mon Jan 13 14:17:39 2003
@@ -25,6 +25,10 @@
         """Returns the schema of records (de)serialized by this aspect.
         """
 
+    def canSerialize(object):
+        """Returns true if this serializer can serialize the given object.
+        """
+
     def serialize(object, event):
         """Returns the state of this aspect of the object.
 


=== Products/AdaptableStorage/mapper/interfaces/IConfigurableObjectMapper.py 1.1 => 1.1.2.1 ===
--- Products/AdaptableStorage/mapper/interfaces/IConfigurableObjectMapper.py:1.1	Tue Dec 31 16:47:46 2002
+++ Products/AdaptableStorage/mapper/interfaces/IConfigurableObjectMapper.py	Mon Jan 13 14:17:39 2003
@@ -46,12 +46,12 @@
         the implemenation prevents overriding an existing mapper.
         """
 
-    def checkConfiguration(names=(), recursive=1):
+    def checkConfiguration(path='root', recursive=1):
         """Verifies the mapper configuration is sane.
 
         Raises an exception if there are errors.
 
-        'names' gives the path to the mapper, for debugging purposes.
+        'path' gives the path to the mapper, for debugging purposes.
         'recursive' can be turned off to not descend into sub-mappers.
         """
 


=== Products/AdaptableStorage/mapper/interfaces/IMapperEvent.py 1.1 => 1.1.2.1 ===
--- Products/AdaptableStorage/mapper/interfaces/IMapperEvent.py:1.1	Tue Dec 31 16:47:46 2002
+++ Products/AdaptableStorage/mapper/interfaces/IMapperEvent.py	Mon Jan 13 14:17:39 2003
@@ -29,3 +29,12 @@
     def makeKeychain(name, stored):
         """Generates a keychain for a subobject.
         """
+
+
+class ILoadEvent (IMapperEvent):
+    """Interface for events involved in loading objects."""
+
+
+class IStoreEvent (IMapperEvent):
+    """Interface for events involved in storing objects."""
+


=== Products/AdaptableStorage/mapper/interfaces/IObjectSerializer.py 1.1 => 1.1.2.1 ===
--- Products/AdaptableStorage/mapper/interfaces/IObjectSerializer.py:1.1	Tue Dec 31 16:47:46 2002
+++ Products/AdaptableStorage/mapper/interfaces/IObjectSerializer.py	Mon Jan 13 14:17:39 2003
@@ -16,37 +16,15 @@
 $Id$
 """
 
-from Interface import Interface
+from IAspectSerializer import IAspectSerializer
 
 
-class IObjectSerializer(Interface):
+class IObjectSerializer(IAspectSerializer):
     """Serializes/deserializes objects.
 
     The serialized state does not need to include the class of the object,
     which is maintained separately.
     """
-
-    def getSchema():
-        """Returns the schema of states (de)serialized by this object.
-        """
-
-    def canSerialize(object):
-        """Returns true if this mapper can serialize the given object.
-        """
-
-    def serialize(object, event):
-        """Returns the serialization of an object.
-
-        Returns a pair containing the serialized state of the object
-        and a list of externally referenced objects of the form
-        (keychain, object).  The serialized state should be a
-        dictionary mapping aspect names to the serialization of the
-        corresponding aspects.
-        """
-
-    def deserialize(object, event, full_state):
-        """Fills an object based on a previously serialized state.
-        """
 
     def createEmptyInstance(classification=None):
         """Returns a new instance.


=== Products/AdaptableStorage/mapper/interfaces/public.py 1.1 => 1.1.2.1 ===
--- Products/AdaptableStorage/mapper/interfaces/public.py:1.1	Tue Dec 31 16:47:46 2002
+++ Products/AdaptableStorage/mapper/interfaces/public.py	Mon Jan 13 14:17:39 2003
@@ -26,7 +26,7 @@
 from IGateway import IGateway
 from IKeychainGenerator import IKeychainGenerator
 from IKeyedObjectSystem import IKeyedObjectSystem
-from IMapperEvent import IMapperEvent
+from IMapperEvent import IMapperEvent, ILoadEvent, IStoreEvent
 from IObjectMapper import IObjectMapper
 from IObjectSerializer import IObjectSerializer
 from ISchema import ISchema