[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container - IAdding.py:1.1 IContentContainer.py:1.1 configure.zcml:1.3

Jim Fulton jim@zope.com
Thu, 20 Jun 2002 16:00:51 -0400


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

Modified Files:
	configure.zcml 
Added Files:
	IAdding.py IContentContainer.py 
Log Message:

Gary and Jim implemented most of:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/AddMenuProposalAndEndOfZmiNamespace

A lot of clean up is needed, including:

- Implementation additional add menus, for example for services.

- Ripping out old unused implementation.





=== Added File Zope3/lib/python/Zope/App/OFS/Container/IAdding.py ===
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# 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.
# 
##############################################################################
"""

$Id: IAdding.py,v 1.1 2002/06/20 20:00:20 jim Exp $
"""

from Interface.Attribute import Attribute

from Zope.ComponentArchitecture.IView import IView

class IAdding(IView):

    def add(content):
         """Add the content object to a container, using the name in
         contentName.  If contentName is already used in container,
         raises Zope.App.OFS.Container.Exceptions.DuplicateIDError"""

    contentName=Attribute(
         """the content name, as usually set by the Adder traverser.

         If the content name hasn't been defined yet, returns None.

         Some creation views might use this to optionally display the
         name on forms.
         """
         )

    def nextURL():
         """Return the URL that the creation view should redirect to

         This is called by the creation view after calling add.

         It is the adder's responsibility, not the creation view's to
         decide what page to display after content is added.
         """


=== Added File Zope3/lib/python/Zope/App/OFS/Container/IContentContainer.py ===
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# 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.
# 
##############################################################################
"""XXX short summary goes here.

XXX longer description goes here.

$Id: IContentContainer.py,v 1.1 2002/06/20 20:00:20 jim Exp $
"""

from IContainer import IWriteContainer

class IContentContainer(IWriteContainer):
    """Containers (like folders) that contain ordinaty content"""


=== Zope3/lib/python/Zope/App/OFS/Container/configure.zcml 1.2 => 1.3 ===
 >
 
+  <include package=".Views" />
+
   <browser:view
       name="_traverse" 
       for=".IContainer.IItemContainer."