[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/VFS - FolderAdd.py:1.1 FolderView.py:1.1

Stephan Richter srichter@cbu.edu
Fri, 20 Dec 2002 05:31:48 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/VFS
In directory cvs.zope.org:/tmp/cvs-serv7739/Zope/App/OFS/Content/Folder/Views/VFS

Added Files:
	FolderAdd.py FolderView.py 
Log Message:
Big oops. I fogot to checkin the added files. This is the rest of the VFS/FTP fix and revamp checkin.


=== Added File Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/VFS/FolderAdd.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.
#
##############################################################################
"""VFS Folder Add View

$Id: FolderAdd.py,v 1.1 2002/12/20 10:31:47 srichter Exp $
"""
from Zope.Publisher.VFS.VFSView import VFSView

from Zope.Event import publish
from Zope.Event.ObjectEvent import ObjectCreatedEvent

from Zope.App.OFS.Container.IAdding import IAdding
from Zope.App.OFS.Content.Folder.Folder import Folder


class FolderAdd(VFSView):
    "Provide a user interface for adding a Folder content object"

    __used_for__ = IAdding

    def __call__(self):
        "Add a folder"
        content = Folder()
        publish(self.context, ObjectCreatedEvent(content))
        return self.context.add(content)



=== Added File Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/VFS/FolderView.py ===
##############################################################################
#
# Copyright (c) 2001, 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.
#
##############################################################################
"""VFS-View for IFolder

$Id: FolderView.py,v 1.1 2002/12/20 10:31:47 srichter Exp $
"""

from Zope.App.OFS.Container.Views.VFS.VFSContainerView import \
     VFSContainerView

class FolderView(VFSContainerView):
    """Specific Folder VFS view."""

    __implments__ = VFSContainerView.__implements__

    _directory_type = 'Folder'