[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl - IServerControl.py:1.1.2.1 StubServerControl.py:1.1.2.1 __init__.py:1.1.2.1 server-control.zcml:1.1.2.1
Philipp von Weitershausen
philikon@gmx.net
Wed, 10 Apr 2002 10:41:56 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl
In directory cvs.zope.org:/tmp/cvs-serv2399/ServerControl
Added Files:
Tag: Zope-3x-branch
IServerControl.py StubServerControl.py __init__.py
server-control.zcml
Log Message:
Added a plugin for ApplicationControl for shutting down and restarting the
server. There is no implementation available yet, though.
=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/IServerControl.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.
#
##############################################################################
__doc__ = """
Revision information:
$Id: IServerControl.py,v 1.1.2.1 2002/04/10 14:41:55 philikon Exp $
Server Control Interface
"""
from Interface import Interface
class IServerControl(Interface):
"""Server Control Interface defines methods for shutting down and
restarting the server."""
def shutdown():
"""Shutdown the server gracefully
"""
def restart():
"""Restart the server gracefully
"""
=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/StubServerControl.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.
#
##############################################################################
__doc__ = """
Revision information:
$Id: StubServerControl.py,v 1.1.2.1 2002/04/10 14:41:55 philikon Exp $
Stupid Server Control
"""
from Zope.App.OFS.ApplicationControl.ServerControl.IServerControl import IServerControl
class StubServerControl:
__implements__ = IServerControl
############################################################
# Implementation methods for interface
# Zope.App.OFS.ApplicationControl.ServerControl.IServerControl.
def shutdown(self):
'See Zope.App.OFS.ApplicationControl.ServerControl.IServerControl.IServerControl'
def restart(self):
'See Zope.App.OFS.ApplicationControl.ServerControl.IServerControl.IServerControl'
#
############################################################
StubServerController = StubServerControl()
=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/__init__.py ===
=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/server-control.zcml ===
<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
xmlns:security='http://namespaces.zope.org/security'
xmlns:zmi='http://namespaces.zope.org/zmi'
xmlns:browser='http://namespaces.zope.org/browser'
>
<security:protectClass name=".StubServerControl."
permission_id="Zope.ManageApplication"
interface=".IServerControl." />
<!-- XXX we need to register a true server controller in a very near future -->
<utility component=".StubServerControl.StubServerController"
provides=".IServerControl." />
<include package=".Views" file="views.zcml" />
</zopeConfigure>