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

Sidnei da Silva sidnei@x3ng.com.br
Tue, 11 Feb 2003 11:00:22 -0500


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

Modified Files:
	__init__.py 
Log Message:
Merging paris-copypasterename-branch. Not very fun :(

=== Zope3/src/zope/app/interfaces/container/__init__.py 1.6 => 1.7 ===
--- 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	Tue Feb 11 10:59:51 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."""
+