[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces - copy.py:1.2.2.1 event.py:1.5.2.1

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


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

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

=== Zope3/src/zope/app/interfaces/copy.py 1.2 => 1.2.2.1 ===
--- Zope3/src/zope/app/interfaces/copy.py:1.2	Mon Feb  3 07:34:01 2003
+++ Zope3/src/zope/app/interfaces/copy.py	Wed Feb  5 05:09:20 2003
@@ -22,7 +22,7 @@
 class IObjectCopier(Interface):
 
     def copyTo(target, name=None):
-        '''Copy this object to the target given.
+        """Copy this object to the target given.
         
         Returns the new name within the target, or None
         if the target doesn't do names.
@@ -31,7 +31,7 @@
         an IObjectCopied event in the context of the target container.
         If a new object is created as part of the copying process, then
         an IObjectCreated event should be published.
-        '''
+        """
 
     def copyable():
         '''Returns True if the object is copyable, otherwise False.'''
@@ -43,3 +43,21 @@
         False.
         '''
 
+class IAnnotatableUserClipboard(Interface):
+    '''Interface for adapters that store/retrieve clipboard information
+    for a user.
+
+    Clipboard information consists on tuples of {'action':action, 'target':target}.
+    '''
+
+    def clearContents():
+        '''Clear the contents of the clipboard'''
+
+    def addItems(action, targets):
+        '''Add new items to the clipboard'''
+
+    def setContents(clipboard):
+        '''Replace the contents of the clipboard by the given value'''
+
+    def getContents():
+        '''Return the contents of the clipboard'''


=== Zope3/src/zope/app/interfaces/event.py 1.5 => 1.5.2.1 ===
--- Zope3/src/zope/app/interfaces/event.py:1.5	Mon Feb  3 10:59:14 2003
+++ Zope3/src/zope/app/interfaces/event.py	Wed Feb  5 05:09:20 2003
@@ -302,3 +302,7 @@
 
     fromLocation = Attribute("The old location for the object.")
 
+class IObjectCopiedEvent(IObjectEvent):
+    """An object has been copied"""
+
+    fromLocation = Attribute("The old location for the object.")