[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/container - __init__.py:1.6.2.1

Sidnei da Silva sidnei@x3ng.com.br
Wed, 5 Feb 2003 05:09:56 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces/container
In directory cvs.zope.org:/tmp/cvs-serv3236/src/zope/app/interfaces/container

Modified Files:
      Tag: paris-copypasterename-branch
	__init__.py 
Log Message:
Fixing ObjectMover tests. Adding ObjectCopier tests. Adding AnnotatableUserClipboard with tests. That was a productive night :)

=== Zope3/src/zope/app/interfaces/container/__init__.py 1.6 => 1.6.2.1 ===
--- Zope3/src/zope/app/interfaces/container/__init__.py:1.6	Mon Feb  3 12:10:58 2003
+++ Zope3/src/zope/app/interfaces/container/__init__.py	Wed Feb  5 05:09:23 2003
@@ -73,8 +73,6 @@
     """Containers that always choose names for their items
     """
 
-
-
 class IAdding(IView):
 
     def add(content):
@@ -116,7 +114,6 @@
         The returned value will be in the context of the container.
         """
 
-
 class IZopeSimpleReadContainer(IZopeItemContainer, ISimpleReadContainer):
     """Readable content containers
     """
@@ -129,12 +126,10 @@
         The value for the key will be in the context of the container.
         """
 
-
 class IZopeReadContainer(IZopeSimpleReadContainer, IReadContainer):
     """Readable containers that can be enumerated.
     """
 
-
     def values():
         """Return the values of the mapping object in the context of
            the container
@@ -223,6 +218,7 @@
         """
 
 class ICopyNotifiable(IAddNotifiable):
+
     def manage_afterAdd(object, container, copiedFrom=None):
         """Hook method. Will be called after an object is added to a
         container.
@@ -284,7 +280,14 @@
         copyingTo is the unicode path for where the copy is to.
         '''
 
-class IContainerCopyPasteMoveSupport(ICopySource, IPasteTarget, IMoveSource):
-    '''An interface for containers that support copy,
-    paste and move operations'''
-    
+class IPasteNamesChooser(Interface):
+    """Containers automatically chooses a new name for the object if the
+    given one is already choosen. 
+    """
+
+    def getNewName(obj, key):
+        """ Should return a choosen name based on object and key to be used
+        for pasting. This may not be reliable all the time as
+        the name you choose is not guaranteed to be reserved between the time
+        you get it and the time you paste the object, so be careful."""
+