Commit 616009fe authored by Wolfgang Schnerring's avatar Wolfgang Schnerring

remove IAdding, it is ZMI-specific and will be kept in zope.app.container

parent 6c75c342
......@@ -18,7 +18,7 @@ $Id$
__docformat__ = 'restructuredtext'
from zope.interface import Interface, Attribute, Invalid
from zope.component.interfaces import IView, IObjectEvent
from zope.component.interfaces import IObjectEvent
from zope.interface.common.mapping import IItemMapping
from zope.interface.common.mapping import IReadMapping, IEnumerableMapping
from zope.location.interfaces import ILocation
......@@ -218,55 +218,6 @@ class IObjectAddedEvent(IObjectMovedEvent):
"""An object has been added to a container."""
class IAdding(IView):
def add(content):
"""Add content object to container.
Add using the name in `contentName`. Returns the added object
in the context of its container.
If `contentName` is already used in container, raises
``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.
"""
def nameAllowed():
"""Return whether names can be input by the user."""
def addingInfo():
"""Return add menu data as a sequence of mappings.
Each mapping contains 'action', 'title', and possibly other keys.
The result is sorted by title.
"""
def isSingleMenuItem():
"""Return whether there is single menu item or not."""
def hasCustomAddView():
"This should be called only if there is `singleMenuItem` else return 0"
class INameChooser(Interface):
def checkName(name, object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment