[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS - IContainerLimit.py:1.1.2.1 IOrderedContainer.py:1.1.2.1 __init__.py:1.1.2.3.4.1 ofs.zcml:1.1.2.1.2.1

Stephan Richter srichter@cbu.edu
Fri, 1 Mar 2002 01:37:37 -0500


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

Modified Files:
      Tag: srichter-OFS_Formulator-branch
	__init__.py ofs.zcml 
Added Files:
      Tag: srichter-OFS_Formulator-branch
	IContainerLimit.py IOrderedContainer.py 
Log Message:
Okay, I am finally ready to check this stuff in:

- Reorganized the internal directory structure of every content object. For
  each content object you have now a Views directory that contains further
  directories for different protocols, such as Browser (HTML), XUL, FTP ...

  Note: None of the directories is file-type, but functionality-based. It 
        is a bad idea to create directories for a particular file type, as
        it was common in Zope 2.

- Made Folder, File and Image forms Formulator-based. This allows us now to
  create forms for new protocols. such as XUL very quickly (often just a
  few lines of code). More to Formulator when it is being checked in.

- Cleaned up most files. Almost all files should have now the correct 
  license disclaimer.

- A new object called LoadedFolder was added. LoadedFolder currently 
  provides two new functionalities to folders:
    1. Ordering. You can change the order of the objects. This idea was 
       taking from the Zope 2 product OrderedFolders.
    2. Limit. You can specify the maximal amount of items the folder is 
       allowed to store. This idea was also taken from OrderedFolders.

  Note: Due to much rearranging during this development, there are no tests
        yet written for this. This needs to be done, before we merge with
        the Zoep-3x-branch again.

- Started XUL implementation of screens.

- Fixed some bugs I found lying around.


=== Added File Zope3/lib/python/Zope/App/OFS/IContainerLimit.py ===
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
# FOR A PARTICULAR PURPOSE.
##############################################################################
"""
  $Id: IContainerLimit.py,v 1.1.2.1 2002/03/01 06:37:06 srichter Exp $
"""

from Interface import Base


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.
    """


    def getLimit():
        """Get the maximal amount of possible objects in this container.
        """


    def setLimit(limit):
        """Set the maximal amount of possible objects in this container.
        """


    def isLimitReached():
        """Returns a boolean describing whether the folder reached its maximal
           amount of objects."""
    
        


=== Added File Zope3/lib/python/Zope/App/OFS/IOrderedContainer.py ===
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
# FOR A PARTICULAR PURPOSE.
##############################################################################
"""
  $Id: IOrderedContainer.py,v 1.1.2.1 2002/03/01 06:37:06 srichter Exp $
"""

from Interface import Base


class IOrderedContainer(Base):
    """This interface adds functionality to containers that will allow
       sorting of the contained items.
       
    """


    def getObjectPosition(id):
        """Ger the position of the object having the id.
        """


    def moveObjectToPosition(id, position):
        """Move an object having id to position.
        """
        

    def moveObjectsUp(ids):
        """Move the specified objects (via ids) one field up.
        """

    
    def moveObjectsDown(ids):
        """Move the specified objects (via ids) one field down.
        """


    def moveObjectsToTop(ids):
        """Move the specified objects (via ids) to the top.
        """


    def moveObjectsToBottom(ids):
        """Move the specified objects (via ids) to the bottom.
        """



=== Zope3/lib/python/Zope/App/OFS/__init__.py 1.1.2.3 => 1.1.2.3.4.1 ===
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors. 
+# All Rights Reserved.
 # 
 # This software is subject to the provisions of the Zope Public License,
-# Version 1.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS 
-# FOR A PARTICULAR PURPOSE.
-
-"""Zope OFS (object file system) package."""
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+# 
+##############################################################################
+"""
+Zope OFS (object file system) package.
 
+$Id$
+"""
 


=== Zope3/lib/python/Zope/App/OFS/ofs.zcml 1.1.2.1 => 1.1.2.1.2.1 ===
 
 <include package="Zope.App.OFS.Folder" file="folder.zcml" />
+<include package="Zope.App.OFS.File" file="file.zcml" />
+<include package="Zope.App.OFS.Image" file="image.zcml" />
+<include package="Zope.App.OFS.ZPTPage" file="zptpage.zcml" />
 
 <browser:view name="_traverse" 
  for="Zope.App.OFS.IContainer."