[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser - Add.py:1.1 Adding.py:1.1 ConnectionAdding.py:1.1 __init__.py:1.1 configure.zcml:1.1
Stephan Richter
srichter@cbu.edu
Mon, 24 Jun 2002 12:18:51 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv17028/OFS/Services/ConnectionService/Views/Browser
Added Files:
Add.py Adding.py ConnectionAdding.py __init__.py
configure.zcml
Log Message:
Initial RDBMS Connection Service...
=== Added File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Add.py ===
from Zope.Publisher.Browser.BrowserView import BrowserView
from Zope.App.OFS.Services.RoleService.Role import Role
from Zope.App.OFS.Services.RoleService.RoleService import ILocalRoleService
class Add(BrowserView):
"Provide a user interface for adding a contact"
__used_for__ = ILocalRoleService
def action(self, id, title, description):
"Add a contact"
role = Role(id, title, description)
self.context.setObject(id, role)
self.request.response.redirect('.')
=== Added File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/Adding.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: Adding.py,v 1.1 2002/06/24 16:18:50 srichter Exp $
"""
from Zope.App.OFS.Container.Views.Browser.Adding import Adding as ContentAdding
class ConnectionAdding(ContentAdding):
"""Adding component for service containers
"""
menu_id = "add_connection"
__doc__ = ConnectionAdding.__doc__ + __doc__
=== Added File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/ConnectionAdding.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: ConnectionAdding.py,v 1.1 2002/06/24 16:18:50 srichter Exp $
"""
from Zope.App.OFS.Container.Views.Browser.Adding import Adding
from Zope.App.OFS.Services.ConnectionService.IConnectionAdding import IConnectionAdding
class ConnectionAdding(Adding):
__implements__ = IConnectionAdding
=== Added File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/__init__.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: __init__.py,v 1.1 2002/06/24 16:18:50 srichter Exp $
"""
=== Added File Zope3/lib/python/Zope/App/OFS/Services/ConnectionService/Views/Browser/configure.zcml ===
<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
xmlns:browser='http://namespaces.zope.org/browser'
>
<browser:defaultView
for="Zope.App.OFS.Services.ConnectionService.IConnectionManager."
name="index.html"
/>
<browser:view
for="Zope.App.RDB.IConnectionService."
permission="Zope.ManageServices"
factory="Zope.App.OFS.Container.Views.Browser.Contents."
>
<browser:page name="index.html"
attribute="index"
/>
</browser:view>
<browser:menu id="add_connection"
title="Add an RDBMS Connection"/>
<browser:view
name="+"
permission="Zope.ManageServices"
for="Zope.App.OFS.Services.ConnectionService.IConnectionManager."
factory=".Adding.ConnectionAdding">
<browser:page name="index.html" attribute="index" />
<browser:page name="action.html" attribute="action" />
</browser:view>
<browser:menuItems menu="zmi_views"
for="Zope.App.OFS.Services.ConnectionService.IConnectionManager.">
<browser:menuItem title="Contents" action="@@index.html"/>
</browser:menuItems>
</zopeConfigure>