[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container - IContainerLimit.py:1.1.2.1 IOrderedContainer.py:1.1.2.1 ContainerTraverser.py:1.1.2.3
Stephan Richter
srichter@cbu.edu
Wed, 27 Mar 2002 10:55:06 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container
In directory cvs.zope.org:/tmp/cvs-serv12282/Container
Modified Files:
Tag: Zope-3x-branch
ContainerTraverser.py
Added Files:
Tag: Zope-3x-branch
IContainerLimit.py IOrderedContainer.py
Log Message:
New Content Objects:
- NaiveFile --> all the data is stored in one string
- File --> Uses a BTree to store the data in chunks (more efficient)
- Image --> Can store and display an image a la Z2 (based on File)
- ZPTPage --> A simple version of ZPT for the content space to allow some
dynamics data (please do not use this for scripting)
Also:
- Expansion of supported views
- all edit screens are Formulator supported
=== Added File Zope3/lib/python/Zope/App/OFS/Container/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/27 15:54:35 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/Container/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/27 15:54:35 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/Container/ContainerTraverser.py 1.1.2.2 => 1.1.2.3 ===
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
+from Zope.Publisher.XMLRPC.IXMLRPCPublisher import IXMLRPCPublisher
from Zope.Publisher.Exceptions import NotFound
from IContainer import IReadContainer
from Zope.ComponentArchitecture import getRequestView
@@ -22,7 +23,7 @@
class ContainerTraverser:
- __implements__ = IBrowserPublisher
+ __implements__ = IBrowserPublisher, IXMLRPCPublisher
__used_for__ = IReadContainer
def __init__(self, c):