[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container - IContainerLimit.py:1.1.2.4 IOrderedContainer.py:1.1.2.4

Gary Poster garyposter@earthlink.net
Thu, 2 May 2002 13:18:17 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container
In directory cvs.zope.org:/tmp/cvs-serv28126/lib/python/Zope/App/OFS/Container

Modified Files:
      Tag: Zope-3x-branch
	IContainerLimit.py IOrderedContainer.py 
Log Message:
Several interfaces divided up into readers (getters) and writers (setters), then used in the zcml for permissions.  Some small changes in the local ServiceManager to deal with the new security a bit better, hopefully.  Fixed Image enough so that you can upload one, but I'm getting a server buffer error when I try to view it.  The change to ZMIViewUtility I'm not sure of, but it made sense to me.

You can now add, edit, and view significantly more of the content since the security changes.



=== Zope3/lib/python/Zope/App/OFS/Container/IContainerLimit.py 1.1.2.3 => 1.1.2.4 ===
 """
 
-from Interface import Base
+from Interface import Interface
 
-
-class IContainerLimit(Base):
-    """This interface adds a specific functionality to a container by
-       specifying the limiting amount of objects in a container.
-
-       NOTE: This interface expects that the IReadContainer interface.
-    """
+class IReadContainerLimit(Interface):
 
 
     def getLimit():
@@ -31,13 +25,22 @@
         """
 
 
+    def isLimitReached():
+        """Returns a boolean describing whether the folder reached its maximal
+           amount of objects."""
+
+class IWriteContainerLimit(Interface):
+
+
     def setLimit(limit):
         """Set the maximal amount of possible objects in this container.
         """
 
+class IContainerLimit(IReadContainerLimit, IWriteContainerLimit):
+    """This interface adds a specific functionality to a container by
+       specifying the limiting amount of objects in a container.
 
-    def isLimitReached():
-        """Returns a boolean describing whether the folder reached its maximal
-           amount of objects."""
+       NOTE: This interface expects that the IReadContainer interface.
+    """
     
         


=== Zope3/lib/python/Zope/App/OFS/Container/IOrderedContainer.py 1.1.2.3 => 1.1.2.4 ===
 """
 
-from Interface import Base
+from Interface import Interface
 
-
-class IOrderedContainer(Base):
-    """This interface adds functionality to containers that will allow
-       sorting of the contained items.
-       
-    """
+class IReadOrderedContainer(Interface):
 
 
     def getObjectPosition(id):
-        """Ger the position of the object having the id.
+        """Get the position of the object having the id.
         """
+    
+class IWriteOrderedContainer(Interface):
 
 
     def moveObjectToPosition(id, position):
@@ -53,4 +50,11 @@
     def moveObjectsToBottom(ids):
         """Move the specified objects (via ids) to the bottom.
         """
+
+
+class IOrderedContainer(IReadOrderedContainer, IWriteOrderedContainer):
+    """This interface adds functionality to containers that will allow
+       sorting of the contained items.
+       
+    """